| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ocl.examples.pivot.AbstractBasicEnvironment
org.eclipse.ocl.examples.pivot.AbstractEnvironment
org.eclipse.ocl.examples.pivot.utilities.PivotEnvironment
public class PivotEnvironment
Implementation of the Environment for parsing OCL expressions on
 Ecore models.  The EcoreEnvironment uses a client-supplied
 package registry (or the global registry) to look up EPackages
 by qualified name.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class org.eclipse.ocl.examples.pivot.AbstractEnvironment | 
|---|
AbstractEnvironment.VariableEntry | 
| Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.pivot.Environment | 
|---|
Environment.Internal, Environment.Registry | 
| Field Summary | 
|---|
| Fields inherited from interface org.eclipse.ocl.examples.pivot.Environment | 
|---|
OCL_NAMESPACE_URI, RESULT_VARIABLE_NAME, SELF_VARIABLE_NAME | 
| Constructor Summary | |
|---|---|
protected  | 
PivotEnvironment(PivotEnvironment parent)
Initializes me with a parent environment, from which I inherit such things as a package registry and a resource.  | 
protected  | 
PivotEnvironment(PivotEnvironmentFactory factory,
                 org.eclipse.emf.ecore.resource.Resource resource)
Initializes me with an environment factory from which package registry and opposite end finder (if any) are obtained consistently, and from a resource in which I am persisted (and from which I load myself if it already has content).  | 
| Method Summary | |
|---|---|
protected  void | 
collectStates(Type owner,
              java.util.List<java.lang.String> pathPrefix,
              java.util.List<State> states)
Implemented by subclasses to find all states in the specified owner type that match the given path name prefix and add them to the accumulator list.  | 
 Constraint | 
getDefinition(java.lang.Object feature)
Obtains the definition constraint of the specified feature, if it is an additional attribute or operation defined via an OCL constraint.  | 
 EnvironmentFactory | 
getFactory()
Obtains the factory that created me, or an appropriate default factory if I was not created using a factory.  | 
 OCLFactory | 
getOCLFactory()
Obtains a factory for the creation of types that are parameterized by model elements.  | 
 StandardLibrary | 
getOCLStandardLibrary()
Obtains the collection of core types representing the OCL Standard Library.  | 
 java.util.List<State> | 
getStates(Type owner,
          java.util.List<java.lang.String> pathPrefix)
Obtains the states matching the specified path prefix in the owner type by trying the collectStates(org.eclipse.ocl.examples.pivot.Type, java.util.List method on it and, recursively, its
 supertypes to find all matches. | 
 TypeManager | 
getTypeManager()
 | 
| Methods inherited from class org.eclipse.ocl.examples.pivot.AbstractEnvironment | 
|---|
addElement, dispose, getContextClassifier, getContextPackage, getInternalParent, getParent, getSelfVariable, notOK, setContextOperation, setContextPackage, setContextProperty, setInternalParent, setParent, setSelfVariable | 
| Methods inherited from class org.eclipse.ocl.examples.pivot.AbstractBasicEnvironment | 
|---|
basicGetOptions, clearOptions, getAdapter, getOptions, getValue, isEnabled, putOptions, removeOption, removeOptions, setOption, setParent | 
| 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.examples.pivot.Adaptable | 
|---|
getAdapter | 
| Methods inherited from interface org.eclipse.ocl.examples.pivot.Customizable | 
|---|
clearOptions, getOptions, getValue, isEnabled, putOptions, removeOption, removeOptions, setOption | 
| Constructor Detail | 
|---|
protected PivotEnvironment(PivotEnvironmentFactory factory,
                           org.eclipse.emf.ecore.resource.Resource resource)
reg - a package registryresource - a resource, which may or may not already have contentprotected PivotEnvironment(PivotEnvironment parent)
parent - my parent environment| Method Detail | 
|---|
public EnvironmentFactory getFactory()
Environment
EnvironmentFactory.createEnvironment(Environment)
public java.util.List<State> getStates(Type owner,
                                       java.util.List<java.lang.String> pathPrefix)
collectStates(org.eclipse.ocl.examples.pivot.Type, java.util.List, java.util.List)   method on it and, recursively, its
 supertypes to find all matches.  For implicit (null) owners,
 looks up the innermost-scoped variable as the implicit source and tries
 again on this variable's type.
 
 To extend this implementation, override the
 collectStates(org.eclipse.ocl.examples.pivot.Type, java.util.List method.
 
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
protected void collectStates(Type owner,
                             java.util.List<java.lang.String> pathPrefix,
                             java.util.List<State> states)
Implementors must only provide the states defined directly in the namespace indicated by the path prefix (i.e., only one level).
owner - the owner typepathPrefix - partial qualified name, specifying the parent of the
     states to be collectionstates - a list of states directly owned by the namespace indicated
     by path prefix, within the owner typegetStates(Type, List)public Constraint getDefinition(java.lang.Object feature)
Environment
feature - a property or operation
null
    if this feature is not defined by OCLpublic StandardLibrary getOCLStandardLibrary()
EnvironmentEnvironmentFactory.
public TypeManager getTypeManager()
public OCLFactory getOCLFactory()
Environment
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||