|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Environment
interface,
instead.
@Deprecated public interface Environment
An Environment stores the variables created while evaluating an OCL expression, including self. It also maintains the package, if the OCL package statement is used.
This interface is not intended to be implemented by clients "directly".
It is highly recommended to extend the EcoreEnvironment
class,
instead.
EcoreEnvironment
,
EnvironmentFactory
Field Summary | |
---|---|
static String |
ANNOTATION_URI_BODY
Deprecated. Source URI of the annotation for the body expression of an operation. |
static String |
ANNOTATION_URI_DEFINE
Deprecated. Source URI of the annotation for the expression defining an additional property or operation. |
static String |
ANNOTATION_URI_DERIVE
Deprecated. Source URI of the annotation for the expression defining the derived value of a property. |
static String |
ANNOTATION_URI_INIT
Deprecated. Source URI of the annotation for the expression defining the initial value of a property. |
Method Summary | |
---|---|
boolean |
addElement(String name,
Variable elem,
boolean exp)
Deprecated. Adds a variable declaration to the environment. |
void |
deleteElement(String name)
Deprecated. Removes a name when it goes out of scope. |
EClass |
getAssociationClass(EReference reference)
Deprecated. Obtains the association class that the specified reference represents, as an EClass , if any. |
EClassifier |
getContextClassifier()
Deprecated. Obtains the context classifier of this environment. |
EOperation |
getContextOperation()
Deprecated. Obtains the context operation of this environment, if it is an operation context. |
EStructuralFeature |
getContextProperty()
Deprecated. Obtains the context property of this environment, if it is a property context. |
String |
getDescription(ENamedElement namedElement)
Deprecated. Obtains the user-presentable description of a named Ecore element. |
EnvironmentFactory |
getFactory()
Deprecated. Obtains the factory that created me, or an appropriate default factory if I was not created using a factory. |
EList |
getMemberEnds(EClass associationClass)
Deprecated. Obtains the ends of the specified association class as a list of EReference s. |
Environment |
getParent()
Deprecated. get the parent environment |
EList |
getQualifiers(EStructuralFeature property)
Deprecated. Gets the qualifiers of a property representing a UML association end. |
Variable |
getSelfVariable()
Deprecated. Gets the self variable, looking it up in a parent environment if necessary. |
EList |
getSignals(EClassifier owner)
Deprecated. Retrieves a list of all signal receptions defined by the specified owner classifier. |
String |
getStateName(EObject state)
Deprecated. Obtains the simple name of the specified state (not the qualified name path). |
EList |
getStates(EClassifier owner,
List pathPrefix)
Deprecated. Retrieves a list of all possible states of the specified owner
whose paths are prefixed by the specified partial name. |
Collection |
getVariables()
Deprecated. Returns the Variable s registered in me explicitly. |
boolean |
isAssociationClass(EClass eclass)
Deprecated. Determines whether the specified eclass is an association
class. |
boolean |
isEmpty()
Deprecated. Is the environment empty? |
boolean |
isQuery(EOperation operation)
Deprecated. Determines whether the specified operation is a query
operation. |
Variable |
lookup(String name)
Deprecated. returns the VariableDeclaration for a variable Looks in parent environment scope if not found in current scope. |
EClass |
lookupAssociationClassReference(EClassifier parent,
String name)
Deprecated. Find reference in the specified class to the named association class. |
Variable |
lookupImplicitSourceForAssociationClass(String name)
Deprecated. Return the variable declaration in namedElements which references the named association class. |
Variable |
lookupImplicitSourceForOperation(String name,
EList params)
Deprecated. Return the Variable declaration in namedElements which contains the name as an EOperation. |
Variable |
lookupImplicitSourceForProperty(String name)
Deprecated. Return the most appropriate matching variable to use as the implicit source of a call to the specified property. |
Variable |
lookupLocal(String name)
Deprecated. Returns the VariableDeclaration for a variable name. |
EOperation |
lookupOperation(EClassifier owner,
String name,
EList args)
Deprecated. Find the operation in the specified class. |
EPackage |
lookupPackage(List names)
Deprecated. Finds the EPackage corresponding to the path: name::... |
EClassifier |
lookupPathName(List names)
Deprecated. Finds the EClassifier corresponding to the path: name::... |
EStructuralFeature |
lookupProperty(EClassifier owner,
String name)
Deprecated. Find a property defined or inherited by the specified classifier. |
EClass |
lookupSignal(EClassifier owner,
String name,
EList args)
Deprecated. Find a received signal in the specified classifier. |
void |
setParent(Environment env)
Deprecated. Set the parent environment |
void |
setSelfVariable(Variable var)
Deprecated. Sets the "self" variable that is the implicit source of any attribute, association end, or operation call. |
Field Detail |
---|
static final String ANNOTATION_URI_DEFINE
static final String ANNOTATION_URI_INIT
static final String ANNOTATION_URI_DERIVE
static final String ANNOTATION_URI_BODY
Method Detail |
---|
EnvironmentFactory getFactory()
EnvironmentFactory.createEnvironment(Environment)
void setParent(Environment env)
env
- Environment getParent()
EClassifier getContextClassifier()
EOperation getContextOperation()
null
if this is not an
operation environmentEStructuralFeature getContextProperty()
null
if this is not a
property environmentboolean isEmpty()
Variable lookupLocal(String name)
name
-
Variable lookup(String name)
name
-
EPackage lookupPackage(List names)
null
.
names
- the path name
null
if not foundEClassifier lookupPathName(List names)
names
-
EOperation lookupOperation(EClassifier owner, String name, EList args)
owner
- the owner type of the called operationname
- the name of the called operationargs
- the arguments (as OCLExpression
s) passed to the operation
null
if not foundEStructuralFeature lookupProperty(EClassifier owner, String name)
owner
- the owner of the property that we are looking for, or
null
to find an implicit owner typename
- the property name
null
if it could not be foundEClass lookupAssociationClassReference(EClassifier parent, String name)
parent
- the referencing class to searchname
- the association class name (with an initial lower case as
per the OCL convention)
null
if the specified
parent
classifier does not have any references
implemented by the named association classEList getStates(EClassifier owner, List pathPrefix)
owner
whose paths are prefixed by the specified partial name. If the
owner is null
, then the target of the oclIsInState()
operation call is implicit and must be looked up in the usual way for
implicit operation call targets.
owner
- the classifier for which states are being sought. Can be
null
in the case of an oclIsInState() call on an
implicit targetpathPrefix
- partial path name of the states being sought. This
can be empty to find the first level of state names
String getStateName(EObject state)
state
- representation of a UML state
EClass lookupSignal(EClassifier owner, String name, EList args)
owner
- the owner type of the signal receptionname
- the name of the signalargs
- the arguments (as OCLExpression
s) passed in the signal
null
if not foundEList getSignals(EClassifier owner)
owner
classifier. This must include also signals
defined by supertypes of the owner.
owner
- the owner type of the signal receptions
EClass
es), or an empty list if noneboolean isQuery(EOperation operation)
operation
is a query
operation.
operation
- an operation
EList getQualifiers(EStructuralFeature property)
property
- a property of the model class
EStructuralFeature
s, or an
empty list if the property has no qualifiersboolean isAssociationClass(EClass eclass)
eclass
is an association
class.
eclass
- an Ecore class
EClass getAssociationClass(EReference reference)
EClass
, if any. This gets the "class" aspect of the
association class, for which the reference represents the "association"
aspect.
reference
- a reference
null
if the reference
does not represent an association classEList getMemberEnds(EClass associationClass)
EReference
s.
associationClass
- an EClass representing an association class
EReference
s representing its member ends (the
association roles)boolean addElement(String name, Variable elem, boolean exp)
name
- elem
- -- variable declarationexp
- -- is the variable explicit?
void deleteElement(String name)
name
- Collection getVariables()
Variable
s registered in me explicitly.
void setSelfVariable(Variable var)
var
- the "self" variableVariable getSelfVariable()
null
if none (which should not
happen as there is always some classifier context)Variable lookupImplicitSourceForProperty(String name)
name
- the property name
Variable lookupImplicitSourceForAssociationClass(String name)
name
- the association class name to seek
null
if none
is foundVariable lookupImplicitSourceForOperation(String name, EList params) throws SemanticException
name
-
SemanticException
String getDescription(ENamedElement namedElement)
ETypedElement
(the user model name)
or the localized metaclass name of the underlying adapted element
in the case of an EClassifier
.
namedElement
- a named element obtained by adaptation of a user
model element
|
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 |