Package org.eclipse.epsilon.eol.models
Class Model
java.lang.Object
org.eclipse.epsilon.eol.models.Model
- All Implemented Interfaces:
AutoCloseable,IModel
- Direct Known Subclasses:
CachedModel,CompositeModel,EmptyModel,HutnModel,JavaModel,JavaObjectModel,ModelGroup,MuddleModel,PatternMatchModel,SpreadsheetModel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.epsilon.eol.models.IModel
IModel.AmbiguityCheckResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringUsed for acquiring properties externally (e.g.protected Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringIndicates that the model will not be modified.static final Stringprotected IPropertyGetterprotected IPropertySetterprotected booleanprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<?>createInstance(String type, Collection<Object> parameters) voiddispose()getFullyQualifiedTypeNameOf(Object instance) Returns a string representing the fully-qualified type of the instance object.getMetamodel(StringProperties properties, IRelativePathResolver resolver) getName()booleanisModelElement(Object instance) Used to test whether a Java object can be contained by this model.booleanbooleanbooleanisPropertySet(Object instance, String property) Returnstrueif this instance has an explicit value for this property.booleanbooleanbooleanknowsAboutProperty(Object instance, String property) Returnstrueif this instance could have this property at some point.voidload(StringProperties properties) voidload(StringProperties properties, String basePath) voidload(StringProperties properties, IRelativePathResolver resolver) voidvoidsetReadOnLoad(boolean readOnLoad) voidsetStoredOnDisposal(boolean storedOnDisposal) Methods 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, deleteElement, getAllOfKind, getAllOfType, getElementById, getElementId, getEnumerationValue, getTypeNameOf, hasType, isInstantiable, load, owns, setElementId, store, store
-
Field Details
-
PROPERTY_NAME
- See Also:
-
PROPERTY_READONLOAD
- See Also:
-
PROPERTY_STOREONDISPOSAL
- See Also:
-
PROPERTY_ALIASES
- See Also:
-
PROPERTY_READONLY
Indicates that the model will not be modified.- Since:
- 1.6
- See Also:
-
ENV_PREFIX
Used for acquiring properties externally (e.g. from environment variables)- Since:
- 1.6
- See Also:
-
name
-
aliases
-
storeOnDisposal
protected boolean storeOnDisposal -
readOnLoad
protected boolean readOnLoad -
propertyGetter
- Since:
- 1.6
-
propertySetter
- Since:
- 1.6
-
-
Constructor Details
-
Model
public Model()
-
-
Method Details
-
getName
-
setName
-
getAliases
- Specified by:
getAliasesin interfaceIModel
-
load
- Specified by:
loadin interfaceIModel- Throws:
EolModelLoadingException
-
load
- Specified by:
loadin interfaceIModel- Throws:
EolModelLoadingException
-
load
public void load(StringProperties properties, IRelativePathResolver resolver) throws EolModelLoadingException - Specified by:
loadin interfaceIModel- Throws:
EolModelLoadingException
-
createInstance
public Object createInstance(String type, Collection<Object> parameters) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException - Specified by:
createInstancein interfaceIModel- Throws:
EolModelElementTypeNotFoundExceptionEolNotInstantiableModelElementTypeException
-
allInstances
-
isOfKind
public boolean isOfKind(Object instance, String metaClass) throws EolModelElementTypeNotFoundException - Specified by:
isOfKindin interfaceIModel- Throws:
EolModelElementTypeNotFoundException
-
isOfType
public boolean isOfType(Object instance, String metaClass) throws EolModelElementTypeNotFoundException - Specified by:
isOfTypein interfaceIModel- Throws:
EolModelElementTypeNotFoundException
-
getFullyQualifiedTypeNameOf
Description copied from interface:IModelReturns a string representing the fully-qualified type of the instance object. The value returned by this function can be passed to createInstance to instantiate another object of the same type as instance.- Specified by:
getFullyQualifiedTypeNameOfin interfaceIModel- Parameters:
instance- The model object whose type is to be determined.- Returns:
- the name of the type of the model object, instance.
-
isModelElement
Description copied from interface:IModelUsed to test whether a Java object can be contained by this model. For example, EMF models can contain instances of EObject, but not instances of just Object.- Specified by:
isModelElementin interfaceIModel- Parameters:
instance- the Java object to test.- Returns:
- true if and only if instance can be contained by this model.
-
getTypeOf
-
isReadOnLoad
public boolean isReadOnLoad()- Specified by:
isReadOnLoadin interfaceIModel
-
isStoredOnDisposal
public boolean isStoredOnDisposal()- Specified by:
isStoredOnDisposalin interfaceIModel
-
setReadOnLoad
public void setReadOnLoad(boolean readOnLoad) - Specified by:
setReadOnLoadin interfaceIModel
-
setStoredOnDisposal
public void setStoredOnDisposal(boolean storedOnDisposal) - Specified by:
setStoredOnDisposalin interfaceIModel
-
getPropertyGetter
- Specified by:
getPropertyGetterin interfaceIModel
-
getPropertySetter
- Specified by:
getPropertySetterin interfaceIModel
-
dispose
public void dispose() -
knowsAboutProperty
Description copied from interface:IModelReturnstrueif this instance could have this property at some point.- Specified by:
knowsAboutPropertyin interfaceIModel
-
getTransactionSupport
- Specified by:
getTransactionSupportin interfaceIModel
-
getMetamodel
- Specified by:
getMetamodelin interfaceIModel
-
isPropertySet
Description copied from interface:IModelReturnstrueif this instance has an explicit value for this property. This would be equivalent to eIsSet in EMF.- Specified by:
isPropertySetin interfaceIModel- Throws:
EolRuntimeException
-