|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.lpg.AbstractBasicEnvironment
org.eclipse.ocl.AbstractEnvironment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
public abstract class AbstractEnvironment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
A partial implementation of the Environment
interface providing
some useful common behavior for providers of metamodel bindings. It is
recommended to extend this class rather than to implement the
Environment
interface from scratch.
In particular, this class provides:
along with some subclass hook methods and convenience methods.
See the Environment
class for a description of the
generic type parameters of this class.
Nested Class Summary | |
---|---|
protected class |
AbstractEnvironment.VariableEntry
Wrapper for OCL variable declarations that additionally tracks whether they are explicit or implicit variables. |
Nested classes/interfaces inherited from interface org.eclipse.ocl.Environment |
---|
Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>, Environment.Lookup<PK,C,O,P>, Environment.Registry |
Field Summary |
---|
Fields inherited from interface org.eclipse.ocl.Environment |
---|
OCL_NAMESPACE_URI, RESULT_VARIABLE_NAME, SELF_VARIABLE_NAME |
Constructor Summary | |
---|---|
protected |
AbstractEnvironment()
Initializes me without a parent environment. |
protected |
AbstractEnvironment(AbstractEnvironment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent)
Initializes me with the specified parent environment, which should be of the same type as me. |
protected |
AbstractEnvironment(Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent)
Initializes me with the specified parent environment. |
Method Summary | ||
---|---|---|
protected void |
addedVariable(java.lang.String name,
Variable<C,PM> variable,
boolean isExplicit)
Persists the specified variable in my resource. |
|
boolean |
addElement(java.lang.String name,
Variable<C,PM> elem,
boolean isExplicit)
Adds a variable declaration to the environment. |
|
void |
addHelperOperation(C owner,
O operation)
Adds an OCL-defined additional ("helper") operation to the environment. |
|
void |
addHelperProperty(C owner,
P property)
Adds an OCL-defined additional ("helper") attribute to the environment. |
|
protected void |
addOperation(C owner,
O operation)
Deprecated. Since 1.2, use the Environment.Internal.addHelperOperation(Object, Object)
API, instead |
|
protected void |
addProperty(C owner,
P property)
Deprecated. Since 1.2, use the Environment.Internal.addHelperProperty(Object, Object)
API, instead |
|
protected TypeChecker<C,O,P> |
createTypeChecker()
Creates my extensible type checker utility when it is first needed. |
|
void |
deleteElement(java.lang.String name)
Removes a variable when it goes out of scope. |
|
void |
dispose()
I dispose my type resolver, if it is an AbstractTypeResolver
and I am the root environment (which owns the resolver). |
|
protected void |
findNonNavigableAssociationEnds(C classifier,
java.lang.String name,
java.util.List<P> ends)
Searches for non-navigable association ends with the specified name at the given classifier's end of an association. |
|
protected void |
findUnnamedAssociationEnds(C classifier,
java.lang.String name,
java.util.List<P> ends)
Searches for unnamed association ends using the specified name at the given classifier's end of an association. |
|
|
getAdapter(java.lang.Class<T> adapterType)
Since AbstractTypeResolver implements TypeChecker ,
AbstractEnvironment will try to adapt TypeChecker , via its
TypeResolver . |
|
java.util.List<P> |
getAdditionalAttributes(C classifier)
Obtains the additional attributes defined in this environment in the context of the specified classifier. |
|
java.util.List<O> |
getAdditionalOperations(C classifier)
Obtains the additional operations defined in this environment in the context of the specified classifier. |
|
CT |
getBodyCondition(O operation)
Obtains an operation's body condition constraint. |
|
C |
getContextClassifier()
Obtains the context classifier of this environment. |
|
O |
getContextOperation()
Obtains the context operation of this environment, if it is an operation context. |
|
PK |
getContextPackage()
Obtains my context package, if any. |
|
P |
getContextProperty()
Obtains the context property of this environment, if it is a property context. |
|
CT |
getDeriveConstraint(P property)
Obtains a property's derived-value constraint. |
|
protected AbstractEnvironment.VariableEntry |
getElement(int index)
|
|
protected int |
getElementsSize()
|
|
CT |
getInitConstraint(P property)
Obtains a property's with an initial-value constraint, if any. |
|
Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
getInternalParent()
Obtains my parent environment after construction. |
|
AbstractEnvironment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
getParent()
Deprecated. Since 1.2, use the getInternalParent() method, instead. |
|
protected org.eclipse.emf.ecore.resource.Resource |
getResource()
Obtains the resource in which my type resolver persists OCL-generated types and additional features. |
|
Variable<C,PM> |
getSelfVariable()
Gets the self variable, looking it up in a parent environment if necessary. |
|
protected TypeChecker<C,O,P> |
getTypeChecker()
Obtains my extensible type checker utility. |
|
java.util.Collection<Variable<C,PM>> |
getVariables()
Returns the Variable s registered explicitly in me and any
parents that I may have. |
|
protected java.lang.String |
initialLower(java.lang.Object element)
Gets the name of a named element with its initial character
in lower case. |
|
boolean |
isEmpty()
Queries whether the environment has any local variables defined in it. |
|
Variable<C,PM> |
lookup(java.lang.String name)
Obtains the Variable bound to a variable name. |
|
C |
lookupAssociationClassReference(C owner,
java.lang.String name)
Finds a reference in the specified class to the named association class. |
|
Variable<C,PM> |
lookupImplicitSourceForAssociationClass(java.lang.String name)
Return an implicit variable that references the named association class. |
|
Variable<C,PM> |
lookupImplicitSourceForOperation(java.lang.String name,
java.util.List<? extends TypedElement<C>> args)
Return an implicit variable declaration that defines the specified operation signature. |
|
Variable<C,PM> |
lookupImplicitSourceForProperty(java.lang.String name)
Return the most appropriate matching variable to use as the implicit source of a call to the specified property. |
|
Variable<C,PM> |
lookupImplicitSourceForSignal(java.lang.String name,
java.util.List<? extends TypedElement<C>> args)
Return an implicit variable declaration that defines the specified signal reception signature. |
|
Variable<C,PM> |
lookupImplicitSourceForState(java.util.List<java.lang.String> path)
Finds the best-matching implicit variable to use as a source for the unqualified oclIsInState() invocation with the specified state qualified name path. |
|
Variable<C,PM> |
lookupLocal(java.lang.String name)
Obtains the Variable bound to a local variable name. |
|
protected P |
lookupNonNavigableEnd(C owner,
java.lang.String name)
Looks up a non-navigable association end on behalf of the specified owner classifier (which is at that end). |
|
O |
lookupOperation(C owner,
java.lang.String name,
java.util.List<? extends TypedElement<C>> args)
Find an operation in the specified class. |
|
P |
lookupProperty(C owner,
java.lang.String name)
Finds a property defined or inherited by the specified classifier. |
|
C |
lookupSignal(C owner,
java.lang.String name,
java.util.List<? extends TypedElement<C>> args)
Finds a received signal in the specified classifier. |
|
S |
lookupState(C owner,
java.util.List<java.lang.String> path)
Finds the state identified by the specified qualified name path, to resolve an oclIsInState() operation. |
|
boolean |
notOK(Option<ProblemHandler.Severity> option)
Queries whether I have a non-OK setting for the specified problem option. |
|
protected void |
removedVariable(java.lang.String name,
Variable<C,PM> variable,
boolean isExplicit)
Removes the specified variable from my resource. |
|
protected void |
resetTypeCaches()
|
|
void |
setBodyCondition(O operation,
CT constraint)
Associates an operation with an body condition constraint. |
|
protected void |
setContextOperation(O contextOperation)
Assigns my context operation. |
|
protected void |
setContextPackage(PK contextPackage)
Assigns my context package. |
|
protected void |
setContextProperty(P contextProperty)
Assigns my context property. |
|
void |
setDeriveConstraint(P property,
CT constraint)
Associates a property with an derived-value constraint. |
|
void |
setInitConstraint(P property,
CT constraint)
Associates a property with an initial-value constraint. |
|
void |
setInternalParent(Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent)
Assigns me a parent environment after construction. |
|
protected void |
setParent(AbstractEnvironment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent)
Assigns me a parent environment after construction. |
|
void |
setSelfVariable(Variable<C,PM> var)
Sets the "self" variable that is the implicit source of any property, operation, or association class call. |
|
C |
tryLookupAssociationClassReference(C owner,
java.lang.String name)
This default implementation simply delegates to the Environment.lookupAssociationClassReference(Object, String) method. |
|
C |
tryLookupClassifier(java.util.List<java.lang.String> names)
This default implementation simply delegates to the Environment.lookupClassifier(List) method. |
|
O |
tryLookupOperation(C owner,
java.lang.String name,
java.util.List<? extends TypedElement<C>> args)
This default implementation simply delegates to the Environment.lookupOperation(Object, String, List) method. |
|
PK |
tryLookupPackage(java.util.List<java.lang.String> names)
This default implementation simply delegates to the Environment.lookupPackage(List) method. |
|
P |
tryLookupProperty(C owner,
java.lang.String name)
This default implementation simply delegates to the Environment.lookupProperty(Object, String) method. |
|
C |
tryLookupSignal(C owner,
java.lang.String name,
java.util.List<? extends TypedElement<C>> args)
This default implementation simply delegates to the Environment.lookupSignal(Object, String, List) method. |
Methods inherited from class org.eclipse.ocl.lpg.AbstractBasicEnvironment |
---|
analyzerError, analyzerError, analyzerError, analyzerWarning, basicGetOptions, clearOptions, createDefaultProblemHandler, createFormattingHelper, getASTMapping, getASTNodeToCSTNodeMap, getFormatter, getOptions, getParser, getProblemHandler, getValue, initASTMapping, initASTMapping, isEnabled, lexerError, parserError, problem, putOptions, removeOption, removeOptions, setASTNodeToCSTNodeMap, setOption, setParent, setParser, setProblemHandler, utilityError, validatorError |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.ocl.lpg.BasicEnvironment |
---|
analyzerError, analyzerError, analyzerError, analyzerWarning, getASTMapping, getFormatter, getParser, getProblemHandler, initASTMapping, lexerError, parserError, problem, setParser, setProblemHandler, utilityError, validatorError |
Methods inherited from interface org.eclipse.ocl.options.Customizable |
---|
clearOptions, getOptions, getValue, isEnabled, putOptions, removeOption, removeOptions, setOption |
Methods inherited from interface org.eclipse.ocl.Environment |
---|
defineAttribute, defineOperation, getDefinition, getFactory, getOCLFactory, getOCLStandardLibrary, getStates, getTypeResolver, getUMLReflection, isInPostcondition, lookupClassifier, lookupPackage, setParent, undefine |
Constructor Detail |
---|
protected AbstractEnvironment()
protected AbstractEnvironment(Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent)
parent
- an environment (or null
)protected AbstractEnvironment(AbstractEnvironment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent)
parent
- an environment of the same type as me (or null
)Method Detail |
---|
public Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> getInternalParent()
Environment.Internal
getInternalParent
in interface Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
@Deprecated public AbstractEnvironment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> getParent()
getInternalParent()
method, instead.
Environment
getParent
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
getParent
in class AbstractBasicEnvironment
null
if I am a root environmentpublic void setInternalParent(Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent)
null
if I previously had one.
setInternalParent
in interface Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
parent
- my new parentprotected void setParent(AbstractEnvironment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent)
null
if I previously had one.
parent
- my new parentpublic PK getContextPackage()
Environment
getContextPackage
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
Environment.getContextClassifier()
protected void setContextPackage(PK contextPackage)
contextPackage
- my new context packagepublic C getContextClassifier()
Environment
getContextClassifier
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
public O getContextOperation()
Environment
getContextOperation
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
null
if this is not an
operation environmentprotected void setContextOperation(O contextOperation)
contextOperation
- my context operationpublic P getContextProperty()
Environment
getContextProperty
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
null
if this is not a
property environmentprotected void setContextProperty(P contextProperty)
contextProperty
- my context propertyprotected org.eclipse.emf.ecore.resource.Resource getResource()
public boolean isEmpty()
Environment
isEmpty
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
true
if no local variables are defined;
false
, otherwisepublic java.util.Collection<Variable<C,PM>> getVariables()
Environment
Variable
s registered explicitly in me and any
parents that I may have. This does not include implicit variables or
variables from parent environments that are shadowed by variables in
the nested scope.
getVariables
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
public boolean addElement(java.lang.String name, Variable<C,PM> elem, boolean isExplicit)
Environment
addElement
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
name
- the name of the variable, or null
elem
- a variable declarationisExplicit
- whether this is an explicitly declared variable
true
if the variable was successfully added because
it wasn't already declared locally in this environment;
false
, otherwiseprotected void addedVariable(java.lang.String name, Variable<C,PM> variable, boolean isExplicit)
name
- the variable namevariable
- the variable addedisExplicit
- whether it is an explicit or implicit variablepublic void deleteElement(java.lang.String name)
Environment
deleteElement
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
name
- the name of the variable to deleteprotected void removedVariable(java.lang.String name, Variable<C,PM> variable, boolean isExplicit)
name
- the variable namevariable
- the variable removedisExplicit
- whether it was an explicit or implicit variablepublic void setSelfVariable(Variable<C,PM> var)
Environment
setSelfVariable
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
var
- the "self" variablepublic Variable<C,PM> getSelfVariable()
Environment
getSelfVariable
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
null
if none (which should
only be the case in a root environment having only a package context,
if even that)protected int getElementsSize()
protected AbstractEnvironment.VariableEntry getElement(int index)
public void addHelperProperty(C owner, P property)
Environment.Internal
Environment.defineAttribute(C, org.eclipse.ocl.expressions.Variable, CT)
method).
addHelperProperty
in interface Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
owner
- the classifier in which context the attribute is definedproperty
- the additional attribute@Deprecated protected void addProperty(C owner, P property)
Environment.Internal.addHelperProperty(Object, Object)
API, instead
Environment.defineAttribute(C, org.eclipse.ocl.expressions.Variable, CT)
method.
owner
- the classifier in which context the attribute is definedproperty
- the additional attributepublic java.util.List<P> getAdditionalAttributes(C classifier)
Environment
getAdditionalAttributes
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
classifier
- a classifier
public void addHelperOperation(C owner, O operation)
Environment.Internal
Environment.defineOperation(C, java.lang.String, C, java.util.List>, CT)
method).
addHelperOperation
in interface Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
owner
- the classifier in which context the attribute is definedoperation
- the additional operation@Deprecated protected void addOperation(C owner, O operation)
Environment.Internal.addHelperOperation(Object, Object)
API, instead
Environment.defineOperation(C, java.lang.String, C, java.util.List>, CT)
method.
owner
- the classifier in which context the attribute is definedoperation
- the additional operationpublic java.util.List<O> getAdditionalOperations(C classifier)
Environment
getAdditionalOperations
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
classifier
- a classifier
public void setInitConstraint(P property, CT constraint)
Environment
setInitConstraint
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
property
- an attributeconstraint
- its initial-value constraintpublic CT getInitConstraint(P property)
Environment
getInitConstraint
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
property
- an attribute
null
if nonepublic void setDeriveConstraint(P property, CT constraint)
Environment
setDeriveConstraint
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
property
- an attributeconstraint
- its derived-value constraintpublic CT getDeriveConstraint(P property)
Environment
getDeriveConstraint
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
property
- an attribute
public void setBodyCondition(O operation, CT constraint)
Environment
setBodyCondition
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
operation
- an operationconstraint
- its body condition constraintpublic CT getBodyCondition(O operation)
Environment
getBodyCondition
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
operation
- an operation
public Variable<C,PM> lookupLocal(java.lang.String name)
Environment
lookupLocal
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
name
- a variable name to look up
null
if not found in
this particular environmentpublic Variable<C,PM> lookup(java.lang.String name)
Environment
lookup
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
name
- a variable name to look up
null
if not found in
this particular environmentpublic O lookupOperation(C owner, java.lang.String name, java.util.List<? extends TypedElement<C>> args)
Environment
lookupOperation
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
owner
- the owner type of the called operation, or null
to find an implicit owner type (in iteration expressions)name
- the name of the called operationargs
- the arguments (expressions or variables) to be matched against
the parameter signature of the operation
null
if not foundpublic P lookupProperty(C owner, java.lang.String name)
Environment
lookupProperty
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
owner
- the owner of the property that we are looking for, or
null
to find an implicit owner type (in iteration
expressions)name
- the property name
null
if it could not be foundpublic C lookupAssociationClassReference(C owner, java.lang.String name)
Environment
lookupAssociationClassReference
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
owner
- the referencing class to search, or
null
to find an implicit owner type (in iteration
expressions)name
- the association class name (with an initial lower case as
per the OCL convention)
null
if the specified owner
is not at the
end of an association with this particular namepublic C lookupSignal(C owner, java.lang.String name, java.util.List<? extends TypedElement<C>> args)
Environment
lookupSignal
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
owner
- the owner type of the signal receptionname
- the name of the signalargs
- the arguments (expressions or variables) matching the
properties of the signal (parameters of the reception feature)
null
if not foundpublic S lookupState(C owner, java.util.List<java.lang.String> path) throws LookupException
Environment
lookupState
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
owner
- the type on which the oclIsInState() operation is
invokedpath
- the state name to seek
null
if not found
LookupException
- in the case that this path is
ambiguous; i.e., that it does not qualify a state reference with
the state machine name to select between same-named states in
different state machinespublic Variable<C,PM> lookupImplicitSourceForOperation(java.lang.String name, java.util.List<? extends TypedElement<C>> args)
Environment
lookupImplicitSourceForOperation
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
name
- the operation nameargs
- the list of arguments (expressions or variables) to match
against the operation parameters
null
if no appropriate
variable can be found whose type defines a property of this namepublic Variable<C,PM> lookupImplicitSourceForProperty(java.lang.String name)
Environment
lookupImplicitSourceForProperty
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
name
- the property name
null
if no appropriate
variable can be found whose type defines a property of this namepublic Variable<C,PM> lookupImplicitSourceForAssociationClass(java.lang.String name)
Environment
lookupImplicitSourceForAssociationClass
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
name
- the association class name to seek
null
if no appropriate
variable can be found whose type defines a property of this namepublic Variable<C,PM> lookupImplicitSourceForSignal(java.lang.String name, java.util.List<? extends TypedElement<C>> args)
Environment
lookupImplicitSourceForSignal
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
name
- the signal nameargs
- the list of arguments (expressions or variables) to match
against the signal reception parameters
null
if no appropriate
variable can be found whose type defines a property of this namepublic Variable<C,PM> lookupImplicitSourceForState(java.util.List<java.lang.String> path) throws LookupException
Environment
lookupImplicitSourceForState
in interface Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
path
- the state name to seek
null
if not found
LookupException
- in the case that this path is
ambiguous; i.e., that it does not qualify a state reference with
the state machine name to select between same-named states in
different state machinesprotected java.lang.String initialLower(java.lang.Object element)
element
with its initial character
in lower case.
element
- a named element
public C tryLookupAssociationClassReference(C owner, java.lang.String name) throws LookupException
Environment.lookupAssociationClassReference(Object, String)
method.
tryLookupAssociationClassReference
in interface Environment.Lookup<PK,C,O,P>
owner
- the referencing class to search, or
null
to find an implicit owner type (in iteration
expressions)name
- the association class name (with an initial lower case as
per the OCL convention)
null
if the specified owner
is not at the
end of an association with this particular name
LookupException
- if lookup fails due to an error such as an ambiguitypublic C tryLookupClassifier(java.util.List<java.lang.String> names) throws LookupException
Environment.lookupClassifier(List)
method.
tryLookupClassifier
in interface Environment.Lookup<PK,C,O,P>
names
- the qualified name
null
if not found
LookupException
- if lookup fails due to an error such as an ambiguitypublic O tryLookupOperation(C owner, java.lang.String name, java.util.List<? extends TypedElement<C>> args) throws LookupException
Environment.lookupOperation(Object, String, List)
method.
tryLookupOperation
in interface Environment.Lookup<PK,C,O,P>
owner
- the owner type of the called operation, or null
to find an implicit owner type (in iteration expressions)name
- the name of the called operationargs
- the arguments (expressions or variables) to be matched against
the parameter signature of the operation
null
if not found
LookupException
- if lookup fails due to an error such as an ambiguitypublic C tryLookupSignal(C owner, java.lang.String name, java.util.List<? extends TypedElement<C>> args) throws LookupException
Environment.lookupSignal(Object, String, List)
method.
tryLookupSignal
in interface Environment.Lookup<PK,C,O,P>
owner
- the owner type of the signal receptionname
- the name of the signalargs
- the arguments (expressions or variables) matching the
properties of the signal (parameters of the reception feature)
null
if not found
LookupException
- if lookup fails due to an error such as an ambiguitypublic PK tryLookupPackage(java.util.List<java.lang.String> names) throws LookupException
Environment.lookupPackage(List)
method.
tryLookupPackage
in interface Environment.Lookup<PK,C,O,P>
names
- the qualified name
null
if not found
LookupException
- if lookup fails due to an error such as an ambiguitypublic P tryLookupProperty(C owner, java.lang.String name) throws LookupException
Environment.lookupProperty(Object, String)
method.
tryLookupProperty
in interface Environment.Lookup<PK,C,O,P>
owner
- the owner of the property that we are looking for, or
null
to find an implicit owner type (in iteration
expressions)name
- the property name
null
if it could not be found
LookupException
- if lookup fails due to an error such as an ambiguityprotected P lookupNonNavigableEnd(C owner, java.lang.String name) throws LookupException
owner
classifier (which is at that end).
owner
- a classifier in the context of which the property is usedname
- the end name to look up
null
if it cannot
be found
LookupException
- in case that multiple non-navigable properties
are found that have the same name and the problem option is ERROR
or worseprotected void findNonNavigableAssociationEnds(C classifier, java.lang.String name, java.util.List<P> ends)
classifier
- a classifier at an association endname
- the non-navigable end name to look forends
- collects the ends found by the subclass implementationprotected void findUnnamedAssociationEnds(C classifier, java.lang.String name, java.util.List<P> ends)
classifier
- a classifier at an association endname
- the initial-lower classifier name to look forends
- collects the ends found by the subclass implementationpublic boolean notOK(Option<ProblemHandler.Severity> option)
option
- the problem option
ProblemHandler.Severity#OK
public void dispose()
AbstractTypeResolver
and I am the root environment (which owns the resolver).
dispose
in interface Environment.Internal<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
protected TypeChecker<C,O,P> getTypeChecker()
createTypeChecker()
protected TypeChecker<C,O,P> createTypeChecker()
getTypeChecker()
public <T> T getAdapter(java.lang.Class<T> adapterType)
AbstractTypeResolver
implements TypeChecker
,
AbstractEnvironment will try to adapt TypeChecker
, via its
TypeResolver
.
getAdapter
in interface Adaptable
getAdapter
in class AbstractBasicEnvironment
T
- the requested adapter interfaceadapterType
- the requested adapter interface
null
if this environment does not adapt to itAbstractBasicEnvironment.getAdapter(java.lang.Class)
protected void resetTypeCaches()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |