Package org.eclipse.epsilon.eol.models
Interface IAdaptableModel
-
- All Superinterfaces:
AutoCloseable
,IModel
- All Known Implementing Classes:
HutnModel
,ModelReference
,ReflectiveModelReference
public interface IAdaptableModel extends IModel
Interface for models which can be adapted to a different model type, if required. Mostly useful for adapting model types which do not implement comparison to those who do.
-
-
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 <T> T
adaptTo(Class<T> modelType)
Tries to adapt the model to a different type.-
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, getPropertySetter, 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
-
adaptTo
<T> T adaptTo(Class<T> modelType)
Tries to adapt the model to a different type. If it is not possible, this method should returnnull
.- Parameters:
modelType
- Type to which this model should be adapted.- Returns:
- Non-null value if the model could be adapted,
null
otherwise.
-
-