org.eclipse.gmt.umlx.ocl.util
Class UmlxEnvironment

java.lang.Object
  extended by org.eclipse.emf.ocl.parser.EcoreEnvironment
      extended by org.eclipse.gmt.umlx.ocl.util.UmlxEnvironment
All Implemented Interfaces:
org.eclipse.emf.ocl.parser.Environment

public class UmlxEnvironment
extends org.eclipse.emf.ocl.parser.EcoreEnvironment

An UmlxEnvironment refines an EcoreEnvironment to support access to Umlx names.


Field Summary
static boolean traceFlag
           
 
Constructor Summary
UmlxEnvironment(org.eclipse.emf.ocl.parser.Environment parent)
           
UmlxEnvironment(org.eclipse.emf.ecore.EPackage packageContext, org.eclipse.emf.ecore.EPackage.Registry registry)
           
 
Method Summary
 boolean addElement(java.lang.String name, org.eclipse.emf.ocl.expressions.VariableDeclaration elem, boolean exp)
           
 void deleteElement(java.lang.String name)
           
 org.eclipse.emf.ecore.EClassifier getContextClassifier()
           
 java.util.Collection getVariables()
           
 boolean isEmpty()
           
 org.eclipse.emf.ocl.expressions.VariableDeclaration lookup(java.lang.String name)
           
 org.eclipse.emf.ecore.EClass lookupAssociationClassReference(org.eclipse.emf.ecore.EClassifier parentClassifier, java.lang.String name)
           
 org.eclipse.emf.ecore.EAttribute lookupAttribute(org.eclipse.emf.ecore.EClassifier parentClassifier, java.lang.String name)
           
 org.eclipse.emf.ocl.expressions.VariableDeclaration lookupImplicitSourceForAssociationClass(java.lang.String name)
           
 org.eclipse.emf.ocl.expressions.VariableDeclaration lookupImplicitSourceForAssociationEnd(java.lang.String name)
           
 org.eclipse.emf.ocl.expressions.VariableDeclaration lookupImplicitSourceForAttribute(java.lang.String name)
           
 org.eclipse.emf.ocl.expressions.VariableDeclaration lookupImplicitSourceForOperation(java.lang.String name, org.eclipse.emf.common.util.EList params)
           
 org.eclipse.emf.ocl.expressions.VariableDeclaration lookupLocal(java.lang.String name)
           
 org.eclipse.emf.ecore.EPackage lookupPackage(java.util.List path)
           
 org.eclipse.emf.ecore.EClassifier lookupPathName(java.util.List names)
           
 org.eclipse.emf.ecore.EReference lookupReference(org.eclipse.emf.ecore.EClassifier parentClassifier, java.lang.String name)
           
 void setContextOperation(org.eclipse.emf.ecore.EOperation operation)
           
 void setParent(org.eclipse.emf.ocl.parser.Environment env)
           
 void setSelfVariable(org.eclipse.emf.ocl.expressions.VariableDeclaration var)
           
 java.lang.String toString()
           
static void trace(java.lang.String s)
           
 
Methods inherited from class org.eclipse.emf.ocl.parser.EcoreEnvironment
findPackage, findPackage, getContextOperation, getDescription, getOclCollectionType, getOclType, getOclType, getParent, getQualifierTypes, getSelfVariable, initialLower, isAssociationClass, isQuery, lookupOperation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

traceFlag

public static boolean traceFlag
Constructor Detail

UmlxEnvironment

public UmlxEnvironment(org.eclipse.emf.ecore.EPackage packageContext,
                       org.eclipse.emf.ecore.EPackage.Registry registry)

UmlxEnvironment

public UmlxEnvironment(org.eclipse.emf.ocl.parser.Environment parent)
Method Detail

trace

public static void trace(java.lang.String s)

addElement

public boolean addElement(java.lang.String name,
                          org.eclipse.emf.ocl.expressions.VariableDeclaration elem,
                          boolean exp)
Specified by:
addElement in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
addElement in class org.eclipse.emf.ocl.parser.EcoreEnvironment

deleteElement

public void deleteElement(java.lang.String name)
Specified by:
deleteElement in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
deleteElement in class org.eclipse.emf.ocl.parser.EcoreEnvironment

getContextClassifier

public org.eclipse.emf.ecore.EClassifier getContextClassifier()
Specified by:
getContextClassifier in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
getContextClassifier in class org.eclipse.emf.ocl.parser.EcoreEnvironment

getVariables

public java.util.Collection getVariables()
Specified by:
getVariables in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
getVariables in class org.eclipse.emf.ocl.parser.EcoreEnvironment

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
isEmpty in class org.eclipse.emf.ocl.parser.EcoreEnvironment

lookup

public org.eclipse.emf.ocl.expressions.VariableDeclaration lookup(java.lang.String name)
Specified by:
lookup in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
lookup in class org.eclipse.emf.ocl.parser.EcoreEnvironment

lookupAssociationClassReference

public org.eclipse.emf.ecore.EClass lookupAssociationClassReference(org.eclipse.emf.ecore.EClassifier parentClassifier,
                                                                    java.lang.String name)
Specified by:
lookupAssociationClassReference in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
lookupAssociationClassReference in class org.eclipse.emf.ocl.parser.EcoreEnvironment

lookupAttribute

public org.eclipse.emf.ecore.EAttribute lookupAttribute(org.eclipse.emf.ecore.EClassifier parentClassifier,
                                                        java.lang.String name)
Specified by:
lookupAttribute in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
lookupAttribute in class org.eclipse.emf.ocl.parser.EcoreEnvironment

lookupImplicitSourceForAssociationClass

public org.eclipse.emf.ocl.expressions.VariableDeclaration lookupImplicitSourceForAssociationClass(java.lang.String name)
Specified by:
lookupImplicitSourceForAssociationClass in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
lookupImplicitSourceForAssociationClass in class org.eclipse.emf.ocl.parser.EcoreEnvironment

lookupImplicitSourceForAssociationEnd

public org.eclipse.emf.ocl.expressions.VariableDeclaration lookupImplicitSourceForAssociationEnd(java.lang.String name)
Specified by:
lookupImplicitSourceForAssociationEnd in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
lookupImplicitSourceForAssociationEnd in class org.eclipse.emf.ocl.parser.EcoreEnvironment

lookupImplicitSourceForAttribute

public org.eclipse.emf.ocl.expressions.VariableDeclaration lookupImplicitSourceForAttribute(java.lang.String name)
Specified by:
lookupImplicitSourceForAttribute in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
lookupImplicitSourceForAttribute in class org.eclipse.emf.ocl.parser.EcoreEnvironment

lookupImplicitSourceForOperation

public org.eclipse.emf.ocl.expressions.VariableDeclaration lookupImplicitSourceForOperation(java.lang.String name,
                                                                                            org.eclipse.emf.common.util.EList params)
                                                                                     throws antlr.SemanticException
Specified by:
lookupImplicitSourceForOperation in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
lookupImplicitSourceForOperation in class org.eclipse.emf.ocl.parser.EcoreEnvironment
Throws:
antlr.SemanticException

lookupLocal

public org.eclipse.emf.ocl.expressions.VariableDeclaration lookupLocal(java.lang.String name)
Specified by:
lookupLocal in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
lookupLocal in class org.eclipse.emf.ocl.parser.EcoreEnvironment

lookupPackage

public org.eclipse.emf.ecore.EPackage lookupPackage(java.util.List path)
Specified by:
lookupPackage in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
lookupPackage in class org.eclipse.emf.ocl.parser.EcoreEnvironment

lookupPathName

public org.eclipse.emf.ecore.EClassifier lookupPathName(java.util.List names)
Specified by:
lookupPathName in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
lookupPathName in class org.eclipse.emf.ocl.parser.EcoreEnvironment

lookupReference

public org.eclipse.emf.ecore.EReference lookupReference(org.eclipse.emf.ecore.EClassifier parentClassifier,
                                                        java.lang.String name)
Specified by:
lookupReference in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
lookupReference in class org.eclipse.emf.ocl.parser.EcoreEnvironment

setContextOperation

public void setContextOperation(org.eclipse.emf.ecore.EOperation operation)
Overrides:
setContextOperation in class org.eclipse.emf.ocl.parser.EcoreEnvironment

setParent

public void setParent(org.eclipse.emf.ocl.parser.Environment env)
Specified by:
setParent in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
setParent in class org.eclipse.emf.ocl.parser.EcoreEnvironment

setSelfVariable

public void setSelfVariable(org.eclipse.emf.ocl.expressions.VariableDeclaration var)
Specified by:
setSelfVariable in interface org.eclipse.emf.ocl.parser.Environment
Overrides:
setSelfVariable in class org.eclipse.emf.ocl.parser.EcoreEnvironment

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object