org.eclipse.ocl.examples.pivot.manager
Class TypeServer
java.lang.Object
org.eclipse.ocl.examples.pivot.manager.TypeTracker
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 classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
org.eclipse.emf.common.notify.Adapter.Internal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
tracker2class
public static com.google.common.base.Function<TypeTracker,Type> tracker2class
TypeServer
protected TypeServer(PackageManager packageManager,
Type primaryType)
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)