|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.ocl.expressions.util.ExpressionsUtil
OCL
and OCLHelper
APIs, instead.
@Deprecated public class ExpressionsUtil
Static utilities for working with expressions.
Method Summary | |
---|---|
static EObject |
containerOfType(EClass type,
EObject eObject)
Deprecated. Computes the nearest container of an eObject that has the
specified type . |
static OCLExpression |
createBodyCondition(EClassifier classifier,
EOperation context,
String expression,
boolean validate)
Deprecated. Creates an operation body condition expression. |
static OCLExpression |
createBodyCondition(Environment env,
String expression,
boolean validate)
Deprecated. Creates an operation body condition expression in the specified environment. |
static OCLExpression |
createBodyCondition(EOperation context,
String expression,
boolean validate)
Deprecated. Creates an operation body condition expression. |
static Environment |
createClassifierContext(EClassifier classifier)
Deprecated. Creates an environment for OCL constraints in the context of the specified classifier . |
static OCLExpression |
createDerivedValueExpression(EClassifier classifier,
EStructuralFeature context,
String expression,
boolean validate)
Deprecated. Creates an property derived value expression. |
static OCLExpression |
createDerivedValueExpression(Environment env,
String expression,
boolean validate)
Deprecated. Creates a property derived value expression in the specified environment. |
static OCLExpression |
createDerivedValueExpression(EStructuralFeature context,
String expression,
boolean validate)
Deprecated. Creates a property derived value expression. |
static OCLExpression |
createInitialValueExpression(EClassifier classifier,
EStructuralFeature context,
String expression,
boolean validate)
Deprecated. Creates an property initial value expression. |
static OCLExpression |
createInitialValueExpression(Environment env,
String expression,
boolean validate)
Deprecated. Creates a property initial value expression in the specified environment. |
static OCLExpression |
createInitialValueExpression(EStructuralFeature context,
String expression,
boolean validate)
Deprecated. Creates a property initial value expression. |
static OCLExpression |
createInvariant(EClassifier context,
String expression,
boolean validate)
Deprecated. Creates an invariant constraint expression. |
static OCLExpression |
createInvariant(Environment env,
String expression,
boolean validate)
Deprecated. Creates an invariant constraint expression in the specified environment. |
static Environment |
createOperationContext(EClassifier classifier,
EOperation operation)
Deprecated. Creates an environment for OCL constraints in the context of the specified classifier and operation . |
static Environment |
createOperationContext(EOperation operation)
Deprecated. Creates an environment for OCL constraints in the context of the specified operation . |
static OCLExpression |
createPostcondition(EClassifier classifier,
EOperation context,
String expression,
boolean validate)
Deprecated. Creates an operation postcondition constraint expression. |
static OCLExpression |
createPostcondition(Environment env,
String expression,
boolean validate)
Deprecated. Creates an operation postcondition constraint expression in the specified environment. |
static OCLExpression |
createPostcondition(EOperation context,
String expression,
boolean validate)
Deprecated. Creates an operation postcondition constraint expression. |
static OCLExpression |
createPrecondition(EClassifier classifier,
EOperation context,
String expression,
boolean validate)
Deprecated. Creates an operation precondition constraint expression. |
static OCLExpression |
createPrecondition(Environment env,
String expression,
boolean validate)
Deprecated. Creates an operation precondition constraint expression in the specified environment. |
static OCLExpression |
createPrecondition(EOperation context,
String expression,
boolean validate)
Deprecated. Creates an operation precondition constraint expression. |
static Environment |
createPropertyContext(EClassifier classifier,
EStructuralFeature property)
Deprecated. Creates an environment for OCL constraints in the context of the specified classifier and property . |
static Environment |
createPropertyContext(EStructuralFeature property)
Deprecated. Creates an environment for OCL constraints in the context of the specified property . |
static OCLExpression |
createQuery(EClassifier context,
String expression,
boolean validate)
Deprecated. Creates a query expression with an arbitrary result type. |
static OCLExpression |
createQuery(Environment env,
String expression,
boolean validate)
Deprecated. Creates a query expression with an arbitrary result type in the specified environment. |
static void |
define(EClassifier context,
String expression)
Deprecated. Defines a property or an operation of the specified signature. |
static ETypedElement |
define(Environment env,
String defExpression)
Deprecated. Defines a property or operation of the specified signature. |
static boolean |
isInPostcondition(OCLExpression exp)
Deprecated. Checks whether the specified OCL expression is in an operation postcondition constraint. |
static Constraint |
toGenericAST(Environment env,
Constraint constraint)
Deprecated. Converts the specified constraint to the generic AST model. |
static OCLExpression<EClassifier> |
toGenericAST(Environment env,
OCLExpression expression)
Deprecated. Converts the specified expression to the generic AST model. |
static Variable<EClassifier,EParameter> |
toGenericAST(Environment env,
Variable variable)
Deprecated. Converts the specified variable to the generic AST model. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Environment createClassifierContext(EClassifier classifier)
classifier
.
classifier
- the context classifier
public static Environment createOperationContext(EClassifier classifier, EOperation operation)
classifier
and operation
.
This is useful when defining constraints on the redefinition of an
operation in the context of a classifier that inherits it (i.e.,
different from the classifier that defines the operation).
classifier
- the context classifieroperation
- the operation context
createOperationContext(EOperation)
public static Environment createOperationContext(EOperation operation)
operation
. The implied classifier context is
the classifier that defines the operation.
operation
- the operation context
createOperationContext(EClassifier, EOperation)
public static Environment createPropertyContext(EClassifier classifier, EStructuralFeature property)
classifier
and property
.
This is useful when defining constraints on the redefinition of a
property in the context of a classifier that inherits it (i.e.,
different from the classifier that defines the property).
classifier
- the context classifierproperty
- the property context
createPropertyContext(EStructuralFeature)
public static Environment createPropertyContext(EStructuralFeature property)
property
. The implied classifier context is
the classifier that defines the property.
property
- the property context
createPropertyContext(EClassifier, EStructuralFeature)
public static OCLExpression createQuery(EClassifier context, String expression, boolean validate) throws ParserException
context
- the invariant's classifier contextexpression
- the expression (without any "inv:"
or
similar preamble)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createQuery(Environment env, String expression, boolean validate) throws ParserException
env
- the OCL environmentexpression
- the expression (without any "inv:"
or
similar preamble)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createInvariant(EClassifier context, String expression, boolean validate) throws ParserException
context
- the invariant's classifier contextexpression
- the expression (without the "inv:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createInvariant(Environment env, String expression, boolean validate) throws ParserException
env
- the OCL environmentexpression
- the expression (without the "inv:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createPrecondition(EOperation context, String expression, boolean validate) throws ParserException
context
- the precondition's operation contextexpression
- the expression (without the "pre:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createPrecondition(EClassifier classifier, EOperation context, String expression, boolean validate) throws ParserException
classifier
- the context classifiercontext
- the precondition's operation contextexpression
- the expression (without the "pre:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createPrecondition(Environment env, String expression, boolean validate) throws ParserException
env
- the OCL environmentexpression
- the expression (without the "pre:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createPostcondition(EOperation context, String expression, boolean validate) throws ParserException
context
- the postcondition's operation contextexpression
- the expression (without the "post:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createPostcondition(EClassifier classifier, EOperation context, String expression, boolean validate) throws ParserException
classifier
- the context classifiercontext
- the postcondition's operation contextexpression
- the expression (without the "post:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createPostcondition(Environment env, String expression, boolean validate) throws ParserException
env
- the OCL environmentexpression
- the expression (without the "post:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createBodyCondition(EOperation context, String expression, boolean validate) throws ParserException
context
- the body's operation contextexpression
- the expression (without the "body:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createBodyCondition(EClassifier classifier, EOperation context, String expression, boolean validate) throws ParserException
classifier
- the context classifiercontext
- the body's operation contextexpression
- the expression (without the "body:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createBodyCondition(Environment env, String expression, boolean validate) throws ParserException
env
- the OCL environmentexpression
- the expression (without the "body:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createInitialValueExpression(EStructuralFeature context, String expression, boolean validate) throws ParserException
context
- the property contextexpression
- the expression (without the "init:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createInitialValueExpression(EClassifier classifier, EStructuralFeature context, String expression, boolean validate) throws ParserException
classifier
- the context classifiercontext
- the property contextexpression
- the expression (without the "init:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createInitialValueExpression(Environment env, String expression, boolean validate) throws ParserException
env
- the OCL property environmentexpression
- the expression (without the "init:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createDerivedValueExpression(EStructuralFeature context, String expression, boolean validate) throws ParserException
context
- the property contextexpression
- the expression (without the "derive:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createDerivedValueExpression(EClassifier classifier, EStructuralFeature context, String expression, boolean validate) throws ParserException
classifier
- the context classifiercontext
- the property contextexpression
- the expression (without the "derive:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static OCLExpression createDerivedValueExpression(Environment env, String expression, boolean validate) throws ParserException
env
- the OCL property environmentexpression
- the expression (without the "derive:"
)validate
- whether to validate the result or not
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static void define(EClassifier context, String expression) throws ParserException
context
- the classifier context to own the new property or operationexpression
- the expression (without the "def:"
preamble but including the "name(...) : type ="
part)
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static ETypedElement define(Environment env, String defExpression) throws ParserException
env
- the OCL classifier environmentdefExpression
- the definition expression (without the "def:"
preamble but including the "name(...) : type ="
part)
EOperation
or EStructuralFeature
ParserException
- if the expression fails to parse
IllegalArgumentException
- if the expression fails to validatepublic static EObject containerOfType(EClass type, EObject eObject)
eObject
that has the
specified type
.
type
- the container type to look foreObject
- the object for which we seek a container
type
, or
null
if no such container is foundpublic static boolean isInPostcondition(OCLExpression exp)
exp
- an OCL expression
true
if it is in a postcondition constraint;
false
, otherwise (including case of no constraint at all)public static OCLExpression<EClassifier> toGenericAST(Environment env, OCLExpression expression)
env
- the OCL environmentexpression
- an expression to convert to the 1.1-version generic
model
public static Variable<EClassifier,EParameter> toGenericAST(Environment env, Variable variable)
env
- the OCL environmentvariable
- a variable to convert to the 1.1-version generic model
public static Constraint toGenericAST(Environment env, Constraint constraint)
env
- the OCL environmentconstraint
- a constraint to convert to the 1.1-version generic model
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |