public abstract class AbstractParserContext extends Object implements ParserContext
| Modifier and Type | Method and Description |
|---|---|
CSResource |
createBaseResource(String expression)
Create a Concrete Syntax resource containing the parsed expression.
|
Attribution |
getAttribution(EObject eObject) |
Type |
getClassContext()
Return the type of the self variable.
|
EnvironmentFactoryInternal |
getEnvironmentFactory()
Return the EnvironmentFactory in use.
|
ExpressionInOCL |
getExpression(CSResource resource)
Extract an Abstract Syntax ExpressionInOCL fronm a Concrete Syntax resource.
|
Type |
getInstanceContext() |
PivotMetamodelManager |
getMetamodelManager()
Return the MetamodelManager in use.
|
Element |
getRootElement()
Optional pre-existing AS root element to be updated by the parse.
|
void |
initialize(Base2ASConversion conversion,
ExpressionInOCL expression)
Callback to initialize the ExpressionInOCL with the derived context such as
a contextvariable for the self type, parameter and result variables.
|
ExpressionInOCL |
parse(EObject owner,
String expression)
Create an Abstract Syntax ExpressionInOCL containing the parsed expression on behalf of a potential owner.
|
void |
setRootElement(Element rootElement) |
public CSResource createBaseResource(String expression) throws IOException, ParserException
ParserContextcreateBaseResource in interface ParserContextIOException - if resource loading failsParserExceptionpublic Attribution getAttribution(EObject eObject)
getAttribution in interface ParserContextpublic Type getClassContext()
ParserContextgetClassContext in interface ParserContextpublic EnvironmentFactoryInternal getEnvironmentFactory()
ParserContextgetEnvironmentFactory in interface ParserContextpublic ExpressionInOCL getExpression(CSResource resource) throws ParserException
ParserContextgetExpression in interface ParserContextParserException - if parsing failspublic Type getInstanceContext()
public PivotMetamodelManager getMetamodelManager()
ParserContextgetMetamodelManager in interface ParserContextpublic Element getRootElement()
ParserContextgetRootElement in interface ParserContextpublic void initialize(Base2ASConversion conversion, ExpressionInOCL expression)
ParserContextinitialize in interface ParserContextpublic ExpressionInOCL parse(EObject owner, String expression) throws ParserException
ParserContext
This an invariant/precondition may specify its constraint as the owner
an operation body may specify the operation as the owner
The owner should be non-null but a null value is tolerated for deprecated compatibility.
parse in interface ParserContextParserException - if parsing failspublic void setRootElement(Element rootElement)
setRootElement in interface ParserContextCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.