public interface 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.
|
EnvironmentFactory |
getEnvironmentFactory()
Return the EnvironmentFactory in use.
|
ExpressionInOCL |
getExpression(CSResource resource)
Extract an Abstract Syntax ExpressionInOCL fronm a Concrete Syntax resource.
|
MetamodelManager |
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) |
CSResource createBaseResource(String expression) throws IOException, ParserException
IOException
- if resource loading failsParserException
Attribution getAttribution(EObject eObject)
Type getClassContext()
EnvironmentFactory getEnvironmentFactory()
ExpressionInOCL getExpression(CSResource resource) throws ParserException
ParserException
- if parsing failsMetamodelManager getMetamodelManager()
Element getRootElement()
void initialize(Base2ASConversion conversion, ExpressionInOCL expression)
ExpressionInOCL parse(EObject owner, String expression) throws ParserException
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.
ParserException
- if parsing failsvoid setRootElement(Element rootElement)
Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.