## org.eclipse.ocl.ecore
Interface OCL.Helper

All Superinterfaces:
  OCLHelper<EClassifier,EOperation,EStructuralFeature,Constraint>

Enclosing class:
  OCL

    public static interface OCL.Helper

extends OCLHelper<EClassifier,EOperation,EStructuralFeature,Constraint>

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

Method Summary
`OCLExpression` `createQuery(String expression)` Creates a query expression in the current classifier context. The return type is narrowed to the Ecore binding for the generic `OCLExpression<C>` type.
`OCL` `getOCL()` Obtains the OCL instance that created me. 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.

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

### createQuery

    OCLExpression createQuery(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 Ecore binding for the generic `OCLExpression<C>` type.

  Specified by:
    `createQuery` in interface `OCLHelper<EClassifier,EOperation,EStructuralFeature,Constraint>`
  Parameters:
    `expression` - the expression (without any context declaration). This expression can have any result type; it needs not be a boolean
  Returns:
    the query expression
  Throws:
    `ParserException` - if the `expression` fails to parse

### getOCL

    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<EClassifier,EOperation,EStructuralFeature,Constraint>`
  Returns:
    the OCL instance that created me

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.