org.eclipse.ocl.examples.pivot.utilities
Class TypeCaches
java.lang.Object
org.eclipse.ocl.examples.pivot.utilities.PivotStandardLibrary
org.eclipse.ocl.examples.pivot.utilities.TypeCaches
- All Implemented Interfaces:
- StandardLibrary
- Direct Known Subclasses:
- TypeManager
public abstract class TypeCaches
- extends PivotStandardLibrary
Method Summary |
void |
addOrphanClass(Type pivotElement)
|
void |
addOrphanOperation(Operation pivotElement)
|
void |
addPackage(Package pivotPackage)
|
java.util.Map<java.lang.String,MonikeredElement> |
computeMoniker2PivotMap(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> pivotResources)
|
protected abstract org.eclipse.emf.ecore.resource.Resource |
createOrphanage(org.eclipse.emf.common.util.URI uri)
|
void |
dispose()
|
|
findOrphanClass(java.lang.Class<T> unspecializedType,
java.lang.String moniker)
|
protected
|
findOrphanOperation(java.lang.Class<T> unspecializedOperation,
java.lang.String moniker)
|
java.lang.Iterable<Class> |
getAllClasses(Type type)
|
java.lang.Iterable<Constraint> |
getAllConstraints(Type type)
Return all constraints applicable to a type and its superclasses. |
protected java.util.Set<Constraint> |
getAllConstraints(Type type,
java.util.Set<Constraint> knownConstraints)
|
java.lang.Iterable<Operation> |
getAllOperations(Operation operation)
|
java.lang.Iterable<java.lang.String> |
getAllPackages()
|
java.lang.Iterable<Package> |
getAllPackages(Package pkg)
|
java.lang.Iterable<Property> |
getAllProperties(Property property)
|
Operation |
getDynamicOperation(Type dynamicType,
Operation staticOperation)
|
java.lang.Iterable<Type> |
getLocalClasses(Package pkg)
|
java.lang.Iterable<Constraint> |
getLocalConstraints(Operation operation)
|
java.lang.Iterable<Constraint> |
getLocalConstraints(Property property)
|
java.lang.Iterable<Constraint> |
getLocalConstraints(Type type)
|
java.lang.Iterable<Operation> |
getLocalOperations(Type type,
java.lang.Boolean selectStatic)
|
java.lang.Iterable<Package> |
getLocalPackages(Package pkg)
|
java.lang.Iterable<Property> |
getLocalProperties(Type type,
java.lang.Boolean selectStatic)
|
Class |
getOrphanClass()
|
Package |
getOrphanPackage()
|
java.lang.String |
getPackageMoniker(java.lang.String uri)
|
Class |
getPrimaryClass(java.lang.String moniker)
|
Class |
getPrimaryClass(Type pivotClass)
|
org.eclipse.emf.ecore.EObject |
getPrimaryElement(org.eclipse.emf.ecore.EObject element)
|
Operation |
getPrimaryOperation(Operation pivotOperation)
|
Operation |
getPrimaryOperation(java.lang.String moniker)
|
Package |
getPrimaryPackage(Package pivotPackage)
|
Package |
getPrimaryPackage(java.lang.String moniker)
|
Property |
getPrimaryProperty(java.lang.String moniker)
|
protected abstract Type |
getSpecializedType(Type type,
java.util.Map<TemplateParameter,ParameterableElement> usageBindings)
|
java.lang.Iterable<Class> |
getSuperClasses(Type pivotType)
|
void |
installPackageMoniker(Package pivotPackage,
boolean installTrackers)
|
void |
installPropertyDeclaration(Property thisProperty)
Create implicit an opposite property if there is no explicit opposite. |
protected abstract void |
installResource(org.eclipse.emf.ecore.resource.Resource resource)
|
protected boolean |
isInOrphanage(org.eclipse.emf.ecore.EObject eObject)
|
protected abstract void |
lazyLoadPivotMetaModel()
|
protected void |
loadPivotMetaModel(Library pivotLibrary)
|
Methods inherited from class org.eclipse.ocl.examples.pivot.utilities.PivotStandardLibrary |
defineLibraryType, getBagType, getBooleanType, getClassifierType, getCollectionType, getEnumerationType, getIntegerType, getLibraryType, getOclAnyType, getOclInvalidType, getOclMessageType, getOclVoidType, getOrderedSetType, getRealType, getRequiredLibraryType, getSequenceType, getSetType, getStringType, getTupleType, getUnlimitedNaturalType, isOrdered, isUnique, loadDefaultLibrary, resetLibrary |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pivotMetaModel
protected Package pivotMetaModel
TypeCaches
public TypeCaches()
addOrphanClass
public void addOrphanClass(Type pivotElement)
addOrphanOperation
public void addOrphanOperation(Operation pivotElement)
addPackage
public void addPackage(Package pivotPackage)
computeMoniker2PivotMap
public java.util.Map<java.lang.String,MonikeredElement> computeMoniker2PivotMap(java.util.Collection<? extends org.eclipse.emf.ecore.resource.Resource> pivotResources)
createOrphanage
protected abstract org.eclipse.emf.ecore.resource.Resource createOrphanage(org.eclipse.emf.common.util.URI uri)
dispose
public void dispose()
findOrphanClass
public <T extends Type> T findOrphanClass(java.lang.Class<T> unspecializedType,
java.lang.String moniker)
findOrphanOperation
protected <T extends Operation> T findOrphanOperation(java.lang.Class<T> unspecializedOperation,
java.lang.String moniker)
getAllClasses
public java.lang.Iterable<Class> getAllClasses(Type type)
getAllConstraints
public java.lang.Iterable<Constraint> getAllConstraints(Type type)
- Return all constraints applicable to a type and its superclasses.
getAllConstraints
protected java.util.Set<Constraint> getAllConstraints(Type type,
java.util.Set<Constraint> knownConstraints)
getAllOperations
public java.lang.Iterable<Operation> getAllOperations(Operation operation)
getAllPackages
public java.lang.Iterable<java.lang.String> getAllPackages()
getAllPackages
public java.lang.Iterable<Package> getAllPackages(Package pkg)
getAllProperties
public java.lang.Iterable<Property> getAllProperties(Property property)
getDynamicOperation
public Operation getDynamicOperation(Type dynamicType,
Operation staticOperation)
getLocalClasses
public java.lang.Iterable<Type> getLocalClasses(Package pkg)
getLocalConstraints
public java.lang.Iterable<Constraint> getLocalConstraints(Operation operation)
getLocalConstraints
public java.lang.Iterable<Constraint> getLocalConstraints(Property property)
getLocalConstraints
public java.lang.Iterable<Constraint> getLocalConstraints(Type type)
getLocalOperations
public java.lang.Iterable<Operation> getLocalOperations(Type type,
java.lang.Boolean selectStatic)
getLocalPackages
public java.lang.Iterable<Package> getLocalPackages(Package pkg)
getLocalProperties
public java.lang.Iterable<Property> getLocalProperties(Type type,
java.lang.Boolean selectStatic)
getOrphanClass
public Class getOrphanClass()
getOrphanPackage
public Package getOrphanPackage()
getPackageMoniker
public java.lang.String getPackageMoniker(java.lang.String uri)
getPrimaryClass
public Class getPrimaryClass(java.lang.String moniker)
getPrimaryClass
public Class getPrimaryClass(Type pivotClass)
getPrimaryElement
public org.eclipse.emf.ecore.EObject getPrimaryElement(org.eclipse.emf.ecore.EObject element)
getPrimaryOperation
public Operation getPrimaryOperation(java.lang.String moniker)
getPrimaryOperation
public Operation getPrimaryOperation(Operation pivotOperation)
getPrimaryPackage
public Package getPrimaryPackage(java.lang.String moniker)
getPrimaryPackage
public Package getPrimaryPackage(Package pivotPackage)
getPrimaryProperty
public Property getPrimaryProperty(java.lang.String moniker)
getSpecializedType
protected abstract Type getSpecializedType(Type type,
java.util.Map<TemplateParameter,ParameterableElement> usageBindings)
getSuperClasses
public java.lang.Iterable<Class> getSuperClasses(Type pivotType)
installPackageMoniker
public void installPackageMoniker(Package pivotPackage,
boolean installTrackers)
installPropertyDeclaration
public void installPropertyDeclaration(Property thisProperty)
- Create implicit an opposite property if there is no explicit opposite.
installResource
protected abstract void installResource(org.eclipse.emf.ecore.resource.Resource resource)
isInOrphanage
protected boolean isInOrphanage(org.eclipse.emf.ecore.EObject eObject)
lazyLoadPivotMetaModel
protected abstract void lazyLoadPivotMetaModel()
loadPivotMetaModel
protected void loadPivotMetaModel(Library pivotLibrary)