Package org.eclipse.epsilon.eol.models
Class ModelRepository
- java.lang.Object
-
- org.eclipse.epsilon.eol.models.ModelRepository
-
public class ModelRepository extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModelRepository.AmbiguityCheckResult
-
Constructor Summary
Constructors Constructor Description ModelRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addModel(IModel model)
void
addModels(java.util.Collection<? extends IModel> models)
void
addModels(IModel... models)
ModelRepository.AmbiguityCheckResult
checkAmbiguity(java.lang.String typeName)
Returns a result that indicates (1) whether the specified type is ambiguous (i.e.void
dispose()
protected java.lang.String
getEnumeration(java.lang.String enumerationAndLabel)
java.lang.Object
getEnumerationValue(java.lang.String modelAndEnumerationAndLabel)
protected java.lang.String
getLabel(java.lang.String enumerationAndLabel)
protected java.lang.String
getMetaClassName(java.lang.String modelAndMetaClass)
IModel
getModelByName(java.lang.String modelName)
IModel
getModelByNameSafe(java.lang.String modelName)
protected java.lang.String
getModelName(java.lang.String modelAndMetaClass)
java.util.List<IModel>
getModels()
IModel
getOwningModel(java.lang.Object instance)
ModelRepositoryTransactionSupport
getTransactionSupport()
void
removeModel(IModel model)
java.lang.String
toString()
-
-
-
Method Detail
-
getTransactionSupport
public ModelRepositoryTransactionSupport getTransactionSupport()
-
addModels
public void addModels(IModel... models)
-
addModels
public void addModels(java.util.Collection<? extends IModel> models)
- Parameters:
models
-- Since:
- 1.6
-
addModel
public void addModel(IModel model)
-
removeModel
public void removeModel(IModel model)
-
getModelByNameSafe
public IModel getModelByNameSafe(java.lang.String modelName)
-
getModelByName
public IModel getModelByName(java.lang.String modelName) throws EolModelNotFoundException
- Throws:
EolModelNotFoundException
-
checkAmbiguity
public ModelRepository.AmbiguityCheckResult checkAmbiguity(java.lang.String typeName)
Returns a result that indicates (1) whether the specified type is ambiguous (i.e. more than oneIModel
in this repository has the type), and (2) the set of models that do have this type.
-
getEnumerationValue
public java.lang.Object getEnumerationValue(java.lang.String modelAndEnumerationAndLabel) throws EolModelNotFoundException, EolEnumerationValueNotFoundException
-
getOwningModel
public IModel getOwningModel(java.lang.Object instance)
-
getMetaClassName
protected java.lang.String getMetaClassName(java.lang.String modelAndMetaClass)
-
getModelName
protected java.lang.String getModelName(java.lang.String modelAndMetaClass)
-
getEnumeration
protected java.lang.String getEnumeration(java.lang.String enumerationAndLabel)
-
getLabel
protected java.lang.String getLabel(java.lang.String enumerationAndLabel)
-
dispose
public void dispose()
-
getModels
public java.util.List<IModel> getModels()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-