Interface OCL.Helper

All Superinterfaces:
Enclosing class:

public static interface OCL.Helper
extends OCLHelper<org.eclipse.uml2.uml.Classifier,org.eclipse.uml2.uml.Operation,org.eclipse.uml2.uml.Property,org.eclipse.uml2.uml.Constraint>

Convenient interface aliasing the type parameter substitutions for the UML environment, for ease of typing.

Christian W. Damus (cdamus)

Method Summary
 OCLExpression createQuery(java.lang.String expression)
          Creates a query expression in the current classifier context.
 OCL getOCL()
          Obtains the OCL instance that created me.
Methods inherited from interface org.eclipse.ocl.helper.OCLHelper
createBodyCondition, createConstraint, createDerivedValueExpression, createInitialValueExpression, createInvariant, createPostcondition, createPrecondition, defineAttribute, defineOperation, getContextAttribute, getContextClassifier, getContextOperation, getEnvironment, getProblems, getSyntaxHelp, isValidating, setAttributeContext, setContext, setInstanceAttributeContext, setInstanceContext, setInstanceOperationContext, setOperationContext, setValidating

Method Detail


OCLExpression createQuery(java.lang.String expression)
                          throws ParserException
Creates a query expression in the current classifier context. This may be specified, for example, as an expression value in the model.

The return type is narrowed to the UML binding for the generic OCLExpression<C> type.

Specified by:
createQuery in interface OCLHelper<org.eclipse.uml2.uml.Classifier,org.eclipse.uml2.uml.Operation,org.eclipse.uml2.uml.Property,org.eclipse.uml2.uml.Constraint>
expression - the expression (without any context declaration). This expression can have any result type; it needs not be a boolean
the query expression
ParserException - if the expression fails to parse


OCL getOCL()
Obtains the OCL instance that created me. Note that many of the generic type parameter bindings will not be known, so clients should keep track of the OCL instance themselves where that is a problem.

The return type is narrowed to the Ecore binding for the generic OCLExpression<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> type.

Specified by:
getOCL in interface OCLHelper<org.eclipse.uml2.uml.Classifier,org.eclipse.uml2.uml.Operation,org.eclipse.uml2.uml.Property,org.eclipse.uml2.uml.Constraint>
the OCL instance that created me