org.eclipse.ocl.examples.pivot.manager
Class TypeServer

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.manager.TypeTracker
      extended by org.eclipse.ocl.examples.pivot.manager.TypeServer
All Implemented Interfaces:
org.eclipse.emf.common.notify.Adapter, org.eclipse.emf.common.notify.Adapter.Internal

public class TypeServer
extends TypeTracker

A TypeServer adapts the primary Type to coordinate the coherent behaviour of a primary and one or more secondary Types as required for Complete OCL type extension. For specializeable types, a TypeServer keeps track of zero or more specializations using WeakReferences so that the specializations vanish once no longer required.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
org.eclipse.emf.common.notify.Adapter.Internal
 
Field Summary
static com.google.common.base.Function<TypeTracker,Type> tracker2class
           
 
Fields inherited from class org.eclipse.ocl.examples.pivot.manager.TypeTracker
packageManager, target
 
Constructor Summary
protected TypeServer(PackageManager packageManager, Type primaryType)
           
 
Method Summary
 TypeClient addSecondaryType(Type secondaryType)
           
protected  Type createSpecialization(java.util.List<? extends ParameterableElement> templateArguments)
           
 void dispose()
           
protected  Type findSpecialization(java.util.List<java.lang.ref.WeakReference<Type>> partialSpecializations, java.util.List<? extends ParameterableElement> templateArguments)
           
 Type findSpecializedType(java.util.List<? extends ParameterableElement> templateArguments)
           
protected  PivotReflectivePackage getExecutorPackage()
           
 ReflectiveType getExecutorType()
           
 Operation getOperation(Operation pivotOperation)
           
 java.lang.Iterable<Operation> getOperations(Operation pivotOperation)
           
 java.lang.Iterable<Property> getProperties(Property pivotProperty)
           
 Property getProperty(java.lang.String propertyName)
           
 Type getSpecializedType(java.util.List<? extends ParameterableElement> templateArguments)
           
 java.lang.Iterable<Type> getTypes()
           
 TypeServer getTypeServer()
           
 TypeTracker getTypeTracker(Type pivotType)
           
 java.util.List<TypeTracker> getTypeTrackers()
           
 void notifyChanged(org.eclipse.emf.common.notify.Notification msg)
          Observe any superclass changes and uninstall all affected Inheritances.
protected  void resolveSuperClasses(Type specializedClass, Type libraryClass, java.util.Map<TemplateParameter,ParameterableElement> allBindings)
           
 
Methods inherited from class org.eclipse.ocl.examples.pivot.manager.TypeTracker
getMetaModelManager, getPackageManager, getPrimaryType, getTarget, initializeContents, isAdapterForType, setTarget, toString, unsetTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tracker2class

public static com.google.common.base.Function<TypeTracker,Type> tracker2class
Constructor Detail

TypeServer

protected TypeServer(PackageManager packageManager,
                     Type primaryType)
Method Detail

addSecondaryType

public TypeClient addSecondaryType(Type secondaryType)

createSpecialization

protected Type createSpecialization(java.util.List<? extends ParameterableElement> templateArguments)

dispose

public void dispose()
Overrides:
dispose in class TypeTracker

findSpecialization

protected Type findSpecialization(java.util.List<java.lang.ref.WeakReference<Type>> partialSpecializations,
                                  java.util.List<? extends ParameterableElement> templateArguments)

findSpecializedType

public Type findSpecializedType(java.util.List<? extends ParameterableElement> templateArguments)

getExecutorPackage

protected PivotReflectivePackage getExecutorPackage()

getExecutorType

public ReflectiveType getExecutorType()

getOperation

public Operation getOperation(Operation pivotOperation)

getOperations

public java.lang.Iterable<Operation> getOperations(Operation pivotOperation)

getProperties

public java.lang.Iterable<Property> getProperties(Property pivotProperty)

getProperty

public Property getProperty(java.lang.String propertyName)

getSpecializedType

public Type getSpecializedType(java.util.List<? extends ParameterableElement> templateArguments)

getTypes

public java.lang.Iterable<Type> getTypes()

getTypeServer

public TypeServer getTypeServer()
Specified by:
getTypeServer in class TypeTracker

getTypeTracker

public TypeTracker getTypeTracker(Type pivotType)

getTypeTrackers

public java.util.List<TypeTracker> getTypeTrackers()

notifyChanged

public void notifyChanged(org.eclipse.emf.common.notify.Notification msg)
Observe any superclass changes and uninstall all affected Inheritances.

Specified by:
notifyChanged in interface org.eclipse.emf.common.notify.Adapter
Overrides:
notifyChanged in class TypeTracker

resolveSuperClasses

protected void resolveSuperClasses(Type specializedClass,
                                   Type libraryClass,
                                   java.util.Map<TemplateParameter,ParameterableElement> allBindings)