Package org.eclipse.epsilon.emc.emf
Class AbstractReflectiveEmfModel
java.lang.Object
org.eclipse.epsilon.eol.models.Model
org.eclipse.epsilon.eol.models.CachedModel<org.eclipse.emf.ecore.EObject>
org.eclipse.epsilon.emc.emf.AbstractEmfModel
org.eclipse.epsilon.emc.emf.AbstractReflectiveEmfModel
- All Implemented Interfaces:
AutoCloseable,IModel,IReflectiveModel
public abstract class AbstractReflectiveEmfModel
extends AbstractEmfModel
implements IReflectiveModel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.epsilon.eol.models.IModel
IModel.AmbiguityCheckResult -
Field Summary
Fields inherited from class org.eclipse.epsilon.emc.emf.AbstractEmfModel
expand, modelImpl, PROPERTY_EXPAND, PROPERTY_PARALLELALLOF, registry, resourceLoadOptions, resourceStoreOptions, transactionSupportFields inherited from class org.eclipse.epsilon.eol.models.CachedModel
allContentsCache, kindCache, PROPERTY_CACHED, PROPERTY_CONCURRENT, typeCacheFields inherited from class org.eclipse.epsilon.eol.models.Model
aliases, ENV_PREFIX, name, PROPERTY_ALIASES, PROPERTY_NAME, PROPERTY_READONLOAD, PROPERTY_READONLY, PROPERTY_STOREONDISPOSAL, propertyGetter, propertySetter, readOnLoad, storeOnDisposal -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEnumerationLabelOf(Object literal) Returns the enumeration label of the literal parameter.getEnumerationTypeOf(Object literal) Returns the name of the enumeration type of the literal parameter.getPropertiesOf(String type) Returns a collection containing all of the properties that instances of type know about.booleanhasPackage(String packageName) Returns true iff this model contains a package with the given name.booleanhasProperty(String type, String property) booleanisEnumerationValue(Object object) Returns true iff object is an enumeration value.booleanPrevents the loading of model elements that are referenced by this model but are not contained in this model.Methods inherited from class org.eclipse.epsilon.emc.emf.AbstractEmfModel
addMetamodelUri, allContentsFromModel, checkAmbiguity, classesForName, classForName, classForName, classForName, createInstanceInModel, deleteElementInModel, disposeModel, getAllOfKindFromModel, getAllOfTypeFromModel, getAllTypeNamesOf, getCacheKeyForType, getContainerOf, getElementById, getElementId, getEnumerationValue, getFullyQualifiedName, getFullyQualifiedTypeNameOf, getInputStream, getModelImpl, getPackageRegistry, getResource, getResourceLoadOptions, getResources, getResourceStoreOptions, getTransactionSupport, getTypeNameOf, getTypeOf, hasAdapter, hasType, initCaches, isExpand, isInstantiable, isLoaded, isModelElement, isOfKind, isOfType, isParallelAllOf, isPropertySet, knowsAboutProperty, knowsAboutProperty, load, owns, putResourceLoadOption, putResourceStoreOption, setElementId, setExpand, setModelImpl, setParallelAllOf, setResource, setResourceLoadOptions, setResourceStoreOptions, store, store, store, validateMethods inherited from class org.eclipse.epsilon.eol.models.CachedModel
addToCache, allContents, clearCache, createInstance, deleteElement, dispose, getAllOfKind, getAllOfKindOrType, getAllOfType, isCachingEnabled, isConcurrent, load, loadModel, removeFromCache, setCachingEnabled, setConcurrent, wrapMethods inherited from class org.eclipse.epsilon.eol.models.Model
allInstances, createInstance, getAliases, getMetamodel, getName, getPropertyGetter, isReadOnLoad, isStoredOnDisposal, load, load, setName, setReadOnLoad, setStoredOnDisposalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.epsilon.eol.models.IModel
allContents, checkAmbiguity, close, createInstance, createInstance, deleteElement, dispose, getAliases, getAllOfKind, getAllOfType, getElementById, getElementId, getEnumerationValue, getFullyQualifiedTypeNameOf, getMetamodel, getName, getPropertyGetter, getTransactionSupport, getTypeNameOf, getTypeOf, hasType, isInstantiable, isModelElement, isOfKind, isOfType, isPropertySet, isReadOnLoad, isStoredOnDisposal, knowsAboutProperty, load, load, load, load, owns, setElementId, setName, setReadOnLoad, setStoredOnDisposal, store, storeMethods inherited from interface org.eclipse.epsilon.eol.models.IReflectiveModel
getContainerOf
-
Constructor Details
-
AbstractReflectiveEmfModel
public AbstractReflectiveEmfModel()
-
-
Method Details
-
getPropertySetter
- Specified by:
getPropertySetterin interfaceIModel- Specified by:
getPropertySetterin interfaceIReflectiveModel- Overrides:
getPropertySetterin classModel
-
getPropertiesOf
Description copied from interface:IReflectiveModelReturns a collection containing all of the properties that instances of type know about.- Specified by:
getPropertiesOfin interfaceIReflectiveModel- Parameters:
type- The type of model object whose properties are to be determined.- Returns:
- all of the properties that instances of type knows about.
- Throws:
EolModelElementTypeNotFoundException- when this model has no such type
-
preventLoadingOfExternalModelElements
public boolean preventLoadingOfExternalModelElements()Description copied from interface:IReflectiveModelPrevents the loading of model elements that are referenced by this model but are not contained in this model. This is useful for clients, such as Epsilon Flock, which create a clone or conservative copy of this model.- Specified by:
preventLoadingOfExternalModelElementsin interfaceIReflectiveModel- Returns:
- true iff this method had an effect (i.e. when this model supports external references, was configured to load external references and is no longer configured to load external references).
-
hasProperty
public boolean hasProperty(String type, String property) throws EolModelElementTypeNotFoundException - Specified by:
hasPropertyin interfaceIReflectiveModel- Throws:
EolModelElementTypeNotFoundException
-
isEnumerationValue
Description copied from interface:IReflectiveModelReturns true iff object is an enumeration value.- Specified by:
isEnumerationValuein interfaceIReflectiveModel
-
getEnumerationTypeOf
Description copied from interface:IReflectiveModelReturns the name of the enumeration type of the literal parameter.- Specified by:
getEnumerationTypeOfin interfaceIReflectiveModel- Throws:
EolNotAnEnumerationValueException- when literal is not an enumeration value
-
getEnumerationLabelOf
Description copied from interface:IReflectiveModelReturns the enumeration label of the literal parameter.- Specified by:
getEnumerationLabelOfin interfaceIReflectiveModel- Throws:
EolNotAnEnumerationValueException- when literal is not an enumeration value
-
hasPackage
Description copied from interface:IReflectiveModelReturns true iff this model contains a package with the given name. In general, a "package" is a group of types (and potentially other packages) and a namespace for the grouped elements. The precise semantics of "package" is specific to the implementation. For example, an Ecore implementation might use EPackage. An XML implementation might use XML namespaces. A CSV implementation might not support any notion of packages (and hence always return false).- Specified by:
hasPackagein interfaceIReflectiveModel
-