public abstract class AbstractParserContext extends java.lang.Object implements ParserContext
| Modifier and Type | Field and Description |
|---|---|
protected MetaModelManager |
metaModelManager |
protected org.eclipse.emf.common.util.URI |
uri |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractParserContext(MetaModelManager metaModelManager,
org.eclipse.emf.common.util.URI uri) |
| Modifier and Type | Method and Description |
|---|---|
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(java.lang.String expression)
Create an Abstract Syntax ExpressionInOCL containing the parsed expression.
|
@NonNull protected final MetaModelManager metaModelManager
@NonNull protected final org.eclipse.emf.common.util.URI uri
protected AbstractParserContext(@NonNull
MetaModelManager metaModelManager,
@Nullable
org.eclipse.emf.common.util.URI uri)
@NonNull public BaseResource createBaseResource(@NonNull java.lang.String expression) throws java.io.IOException, ParserException
ParserContextcreateBaseResource in interface ParserContextjava.io.IOException - if resource loading failsParserException@Nullable public Type getClassContext()
ParserContextgetClassContext in interface ParserContext@NonNull public ExpressionInOCL getExpression(@NonNull BaseResource resource) throws ParserException
ParserContextgetExpression in interface ParserContextParserException - if parsing fails@NonNull public MetaModelManager getMetaModelManager()
ParserContextgetMetaModelManager in interface ParserContextpublic void initialize(@NonNull
Base2PivotConversion conversion,
@NonNull
ExpressionInOCL expression)
ParserContextinitialize in interface ParserContext@NonNull public ExpressionInOCL parse(@NonNull java.lang.String expression) throws ParserException
ParserContextparse in interface ParserContextParserException - if parsing fails