| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.emf.ecore.EObject |
context |
protected OCL |
ocl |
| Constructor and Description |
|---|
OCLHelperImpl(OCL ocl,
org.eclipse.emf.ecore.EObject context)
Initializes me with my environment.
|
| Modifier and Type | Method and Description |
|---|---|
ExpressionInOCL |
createBodyCondition(java.lang.String expression)
Creates an operation body.
|
ExpressionInOCL |
createDerivedValueExpression(java.lang.String expression)
Creates a property derived value expression.
|
ExpressionInOCL |
createInvariant(java.lang.String expression)
Creates an invariant constraint in the current classifier context.
|
ExpressionInOCL |
createPostcondition(java.lang.String expression)
Creates an operation postcondition constraint.
|
ExpressionInOCL |
createPrecondition(java.lang.String expression)
Creates an operation precondition constraint.
|
ExpressionInOCL |
createQuery(java.lang.String expression)
Creates a query expression in the current classifier context.
|
protected ExpressionInOCL |
createSpecification(java.lang.String expression) |
Type |
getContextClass()
Obtains my OCL context classifier as a classifier.
|
Operation |
getContextOperation()
Obtains my context operation, if my environment is an operation context.
|
Property |
getContextProperty()
Obtains my context attribute, if my environment is an attribute context.
|
EnvironmentFactory |
getEnvironmentFactory() |
MetamodelManager |
getMetamodelManager() |
OCL |
getOCL()
Obtains the OCL instance that created me.
|
@NonNull protected final OCL ocl
@Nullable protected final org.eclipse.emf.ecore.EObject context
public OCLHelperImpl(@NonNull
OCL ocl,
@Nullable
org.eclipse.emf.ecore.EObject context)
throws ParserException
ocl - the OCL environmentParserException@NonNull public ExpressionInOCL createBodyCondition(@NonNull java.lang.String expression) throws ParserException
OCLHelpercreateBodyCondition in interface OCLHelperexpression - the constraint expression (without any context
declaration). Ordinarily, this is an expression of the same type
as the operation, specifying the value of the operation.
Alternatively, this may be a boolean-valued expression phrased like
a post-condition (according to the well-formedness rules of UML
constraints)ParserException - if the expression fails to parse@NonNull public ExpressionInOCL createDerivedValueExpression(@NonNull java.lang.String expression) throws ParserException
OCLHelpercreateDerivedValueExpression in interface OCLHelperexpression - the derived value expression (without any context
declaration). This must conform to my context property typeParserException - if the expression fails to parse
or is not valid for my context property@NonNull public ExpressionInOCL createInvariant(@NonNull java.lang.String expression) throws ParserException
OCLHelpercreateInvariant in interface OCLHelperexpression - the constraint expression (without any context
declaration). This must be a boolean-valued expressionParserException - if the expression fails to parse@NonNull public ExpressionInOCL createPostcondition(@NonNull java.lang.String expression) throws ParserException
OCLHelpercreatePostcondition in interface OCLHelperexpression - the constraint expression (without any context
declaration). This must be a boolean-valued expressionParserException - if the expression fails to parse@NonNull public ExpressionInOCL createPrecondition(@NonNull java.lang.String expression) throws ParserException
OCLHelpercreatePrecondition in interface OCLHelperexpression - the constraint expression (without any context
declaration). This must be a boolean-valued expressionParserException - if the expression fails to parse@NonNull public ExpressionInOCL createQuery(@NonNull java.lang.String expression) throws ParserException
OCLHelpercreateQuery in interface OCLHelperexpression - the expression (without any context declaration).
This expression can have any result type; it needs not be a booleanParserException - if the expression fails to parse@NonNull protected ExpressionInOCL createSpecification(@NonNull java.lang.String expression) throws ParserException
ParserException@Nullable public Type getContextClass()
OCLHelpergetContextClass in interface OCLHelpernull)@Nullable public Property getContextProperty()
OCLHelpergetContextProperty in interface OCLHelpernull if there is only a
classifier or operation context@Nullable public Operation getContextOperation()
OCLHelpergetContextOperation in interface OCLHelpernull if there is only a
classifier or attribute context@NonNull public EnvironmentFactory getEnvironmentFactory()
@NonNull public MetamodelManager getMetamodelManager()