Package org.eclipse.epsilon.eol.models
Interface IReflectiveModel
-
- All Superinterfaces:
AutoCloseable
,IModel
- All Known Implementing Classes:
AbstractReflectiveEmfModel
,CDOModel
,DecoratorEmfModel
,EmfM0Model
,EmfModel
,HutnModel
,InMemoryEmfModel
,InMemoryFlexmiModel
,JavaModel
,ModelSpy
,ReflectiveModelReference
,UmlModel
,XmlModel
public interface IReflectiveModel extends IModel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.epsilon.eol.models.IModel
IModel.AmbiguityCheckResult
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getContainerOf(Object object)
Returns the model element that contains the given model element, or null if the given model element is top-level.String
getEnumerationLabelOf(Object literal)
Returns the enumeration label of the literal parameter.String
getEnumerationTypeOf(Object literal)
Returns the name of the enumeration type of the literal parameter.Collection<String>
getPropertiesOf(String type)
Returns a collection containing all of the properties that instances of type know about.IReflectivePropertySetter
getPropertySetter()
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
preventLoadingOfExternalModelElements()
Prevents the loading of model elements that are referenced by this model but are not contained in this model.-
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
-
-
-
-
Method Detail
-
preventLoadingOfExternalModelElements
boolean preventLoadingOfExternalModelElements()
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.- 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).
-
getContainerOf
Object getContainerOf(Object object)
Returns the model element that contains the given model element, or null if the given model element is top-level.- Parameters:
object
- The model element whose container is to be found.- Returns:
- the model element that contains object, or null if object is not contained in any other model element.
-
getPropertiesOf
Collection<String> getPropertiesOf(String type) throws EolModelElementTypeNotFoundException
Returns a collection containing all of the properties that instances of type know about.- 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
-
getPropertySetter
IReflectivePropertySetter getPropertySetter()
- Specified by:
getPropertySetter
in interfaceIModel
-
hasProperty
boolean hasProperty(String type, String property) throws EolModelElementTypeNotFoundException
-
isEnumerationValue
boolean isEnumerationValue(Object object)
Returns true iff object is an enumeration value.
-
getEnumerationTypeOf
String getEnumerationTypeOf(Object literal) throws EolNotAnEnumerationValueException
Returns the name of the enumeration type of the literal parameter.- Throws:
EolEnumerationTypeNotFoundException
- when the enumeration type of literal is not present in this modelEolNotAnEnumerationValueException
- when literal is not an enumeration value
-
getEnumerationLabelOf
String getEnumerationLabelOf(Object literal) throws EolNotAnEnumerationValueException
Returns the enumeration label of the literal parameter.- Throws:
EolEnumerationTypeNotFoundException
- when the enumeration type of literal is not present in this modelEolNotAnEnumerationValueException
- when literal is not an enumeration value
-
hasPackage
boolean hasPackage(String packageName)
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).- Parameters:
packageName
-
-
-