public interface OCLHelper
An OCL helper is created by the OCL.createOCLHelper(EObject)
factory method.
Note that this interface is not intended to be implemented by clients.
Modifier and Type | Method and Description |
---|---|
ExpressionInOCL |
createBodyCondition(String expression)
Creates an operation body.
|
ExpressionInOCL |
createDerivedValueExpression(String expression)
Creates a property derived value expression.
|
ExpressionInOCL |
createInvariant(String expression)
Creates an invariant constraint in the current classifier context.
|
ExpressionInOCL |
createPostcondition(String expression)
Creates an operation postcondition constraint.
|
ExpressionInOCL |
createPrecondition(String expression)
Creates an operation precondition constraint.
|
ExpressionInOCL |
createQuery(String expression)
Creates a query expression in the current classifier context.
|
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.
|
OCL |
getOCL()
Obtains the OCL instance that created me.
|
Type getContextClass()
null
)Operation getContextOperation()
null
if there is only a
classifier or attribute contextProperty getContextProperty()
null
if there is only a
classifier or operation contextOCL getOCL()
ExpressionInOCL createQuery(String expression) throws ParserException
expression
- the expression (without any context declaration).
This expression can have any result type; it needs not be a booleanParserException
- if the expression
fails to parseExpressionInOCL createInvariant(String expression) throws ParserException
expression
- the constraint expression (without any context
declaration). This must be a boolean-valued expressionParserException
- if the expression
fails to parseExpressionInOCL createPrecondition(String expression) throws ParserException
expression
- the constraint expression (without any context
declaration). This must be a boolean-valued expressionParserException
- if the expression
fails to parseExpressionInOCL createPostcondition(String expression) throws ParserException
expression
- the constraint expression (without any context
declaration). This must be a boolean-valued expressionParserException
- if the expression
fails to parseExpressionInOCL createBodyCondition(String expression) throws ParserException
expression
- 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 parseExpressionInOCL createDerivedValueExpression(String expression) throws ParserException
expression
- 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 propertyCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.