|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ParserContext
A ParserContext captures the context in which source text is parsed. A derived context is constructed with the relevant context, then createBaseResource creates a Concrete Syntax resource for a Concrete Syntax expression string. Then parse creates a corresponding Abstract Syntax ExpressionInOCL. initialize is invoked during the parse to install the derived context into the ExpressionInOCL.
Method Summary | |
---|---|
BaseResource |
createBaseResource(java.lang.String expression)
Create a Concrete Syntax resource containing the parsed expression. |
Type |
getClassContext()
Return the type of the self variable. |
ExpressionInOCL |
getExpression(BaseResource resource)
Extract an Abstract Syntax ExpressionInOCL fronm a Concrete Syntax resource. |
MetaModelManager |
getMetaModelManager()
Returbn the MetaModelManager in use. |
void |
initialize(Base2PivotConversion 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(org.eclipse.emf.ecore.EObject owner,
java.lang.String expression)
Create an Abstract Syntax ExpressionInOCL containing the parsed expression on behalf of a potential owner. |
ExpressionInOCL |
parse(java.lang.String expression)
Deprecated. specify owner/owningList for use in diagnostics |
Method Detail |
---|
@NonNull BaseResource createBaseResource(@NonNull java.lang.String expression) throws java.io.IOException, ParserException
java.io.IOException
- if resource loading fails
ParserException
@Nullable Type getClassContext()
@Nullable ExpressionInOCL getExpression(@NonNull BaseResource resource) throws ParserException
ParserException
- if parsing fails@NonNull MetaModelManager getMetaModelManager()
void initialize(@NonNull Base2PivotConversion conversion, @NonNull ExpressionInOCL expression)
@Deprecated @NonNull ExpressionInOCL parse(@NonNull java.lang.String expression) throws ParserException
ParserException
- if parsing fails@NonNull ExpressionInOCL parse(@Nullable org.eclipse.emf.ecore.EObject owner, @NonNull java.lang.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 fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |