org.eclipse.ocl.internal
Class EnvironmentRegistryImpl

java.lang.Object
  extended by org.eclipse.ocl.internal.EnvironmentRegistryImpl
All Implemented Interfaces:
Environment.Registry

public class EnvironmentRegistryImpl
extends java.lang.Object
implements Environment.Registry

Implementation of the environment registry.

Author:
cdamus

Field Summary
 
Fields inherited from interface org.eclipse.ocl.Environment.Registry
INSTANCE
 
Constructor Summary
EnvironmentRegistryImpl()
           
 
Method Summary
 void deregisterEnvironment(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment)
          Removes the specified environment from the registry.
<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
getEnvironmentFor(java.lang.Object abstractSyntaxElement)
          Obtains a suitable environment for introspection of the specified model element, type (such as a collection type), or other abstract syntax element (e.g., a variable).
<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
getEnvironmentFor(OCLExpression<C> expression)
          Obtains a suitable environment for introspection of the specified expression.
 void registerEnvironment(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment)
          Adds the specified environment to the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvironmentRegistryImpl

public EnvironmentRegistryImpl()
Method Detail

getEnvironmentFor

public <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> getEnvironmentFor(OCLExpression<C> expression)
Description copied from interface: Environment.Registry
Obtains a suitable environment for introspection of the specified expression.

Specified by:
getEnvironmentFor in interface Environment.Registry
Parameters:
expression - a parsed OCL expression
Returns:
the matching registered environment, or null if none is available

getEnvironmentFor

public <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> getEnvironmentFor(java.lang.Object abstractSyntaxElement)
Description copied from interface: Environment.Registry
Obtains a suitable environment for introspection of the specified model element, type (such as a collection type), or other abstract syntax element (e.g., a variable).

Specified by:
getEnvironmentFor in interface Environment.Registry
Parameters:
abstractSyntaxElement - an element in or referenced by the AST of of an OCL constraint
Returns:
the matching registered environment, or null if none is available

registerEnvironment

public void registerEnvironment(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment)
Description copied from interface: Environment.Registry
Adds the specified environment to the registry.

Specified by:
registerEnvironment in interface Environment.Registry
Parameters:
environment - an environment to register

deregisterEnvironment

public void deregisterEnvironment(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment)
Description copied from interface: Environment.Registry
Removes the specified environment from the registry.

Specified by:
deregisterEnvironment in interface Environment.Registry
Parameters:
environment - the environment to deregister