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, transactionSupport
Fields inherited from class org.eclipse.epsilon.eol.models.CachedModel
allContentsCache, kindCache, PROPERTY_CACHED, PROPERTY_CONCURRENT, typeCache
Fields 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.boolean
hasPackage
(String packageName) Returns true iff this model contains a package with the given name.boolean
hasProperty
(String type, String property) boolean
isEnumerationValue
(Object object) Returns true iff object is an enumeration value.boolean
Prevents 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, validate
Methods 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, wrap
Methods inherited from class org.eclipse.epsilon.eol.models.Model
allInstances, createInstance, getAliases, getMetamodel, getName, getPropertyGetter, isReadOnLoad, isStoredOnDisposal, load, load, setName, setReadOnLoad, setStoredOnDisposal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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, store
Methods inherited from interface org.eclipse.epsilon.eol.models.IReflectiveModel
getContainerOf
-
Constructor Details
-
AbstractReflectiveEmfModel
public AbstractReflectiveEmfModel()
-
-
Method Details
-
getPropertySetter
- Specified by:
getPropertySetter
in interfaceIModel
- Specified by:
getPropertySetter
in interfaceIReflectiveModel
- Overrides:
getPropertySetter
in classModel
-
getPropertiesOf
Description copied from interface:IReflectiveModel
Returns a collection containing all of the properties that instances of type know about.- Specified by:
getPropertiesOf
in 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:IReflectiveModel
Prevents 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:
preventLoadingOfExternalModelElements
in 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:
hasProperty
in interfaceIReflectiveModel
- Throws:
EolModelElementTypeNotFoundException
-
isEnumerationValue
Description copied from interface:IReflectiveModel
Returns true iff object is an enumeration value.- Specified by:
isEnumerationValue
in interfaceIReflectiveModel
-
getEnumerationTypeOf
Description copied from interface:IReflectiveModel
Returns the name of the enumeration type of the literal parameter.- Specified by:
getEnumerationTypeOf
in interfaceIReflectiveModel
- Throws:
EolNotAnEnumerationValueException
- when literal is not an enumeration value
-
getEnumerationLabelOf
Description copied from interface:IReflectiveModel
Returns the enumeration label of the literal parameter.- Specified by:
getEnumerationLabelOf
in interfaceIReflectiveModel
- Throws:
EolNotAnEnumerationValueException
- when literal is not an enumeration value
-
hasPackage
Description copied from interface:IReflectiveModel
Returns 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:
hasPackage
in interfaceIReflectiveModel
-