Class PatternMatchModel
java.lang.Object
org.eclipse.epsilon.eol.models.Model
org.eclipse.epsilon.epl.execute.model.PatternMatchModel
- All Implemented Interfaces:
AutoCloseable
,IModel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.epsilon.eol.models.IModel
IModel.AmbiguityCheckResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Set<PatternMatch>
protected final Map<String,
Collection<PatternMatch>> 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 TypeMethodDescriptionvoid
addMatch
(PatternMatch match) void
addMatches
(Collection<PatternMatch> matches) Collection<?>
Returns a collection containing all of the objects contained in this model.createInstance
(String type) void
deleteElement
(Object instance) void
dispose()
Collection<?>
getAllOfKind
(String type) Collection<?>
getAllOfType
(String type) getElementById
(String id) getElementId
(Object instance) getEnumerationValue
(String enumeration, String label) getTypeNameOf
(Object instance) Returns a string representing the type of the instance object.boolean
boolean
isInstantiable
(String type) boolean
isModelElement
(Object instance) Used to test whether a Java object can be contained by this model.void
load()
boolean
Used to test whether an object is contained in this model.void
setElementId
(Object instance, String newId) void
setPatterns
(Collection<Pattern> patterns) boolean
store()
boolean
toString()
Methods inherited from class org.eclipse.epsilon.eol.models.Model
allInstances, createInstance, getAliases, getFullyQualifiedTypeNameOf, getMetamodel, getName, getTransactionSupport, isOfKind, isOfType, isPropertySet, isReadOnLoad, isStoredOnDisposal, knowsAboutProperty, load, load, load, setName, setReadOnLoad, setStoredOnDisposal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.epsilon.eol.models.IModel
checkAmbiguity, close
-
Field Details
-
matchMap
-
componentMap
-
matches
-
-
Constructor Details
-
PatternMatchModel
public PatternMatchModel()
-
-
Method Details
-
dispose
public void dispose() -
addMatches
- Parameters:
matches
-- Since:
- 1.6
-
addMatch
-
setPatterns
-
load
- Throws:
EolModelLoadingException
-
getEnumerationValue
public Object getEnumerationValue(String enumeration, String label) throws EolEnumerationValueNotFoundException -
allContents
Description copied from interface:IModel
Returns a collection containing all of the objects contained in this model.- Returns:
- all of the objects contained in this model.
-
getMatches
-
getAllOfType
-
getAllOfKind
-
getTypeOf
-
getTypeNameOf
Description copied from interface:IModel
Returns a string representing the 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.- Parameters:
instance
- The model object whose type is to be determined.- Returns:
- the name of the type of the model object, instance.
-
createInstance
public Object createInstance(String type) throws EolModelElementTypeNotFoundException, EolNotInstantiableModelElementTypeException -
getElementById
-
getElementId
-
setElementId
-
deleteElement
- Throws:
EolRuntimeException
-
owns
Description copied from interface:IModel
Used to test whether an object is contained in this model.- Parameters:
instance
- the Java object to test.- Returns:
- true if and only if instance is contained by this model.
-
isInstantiable
-
isModelElement
Description copied from interface:IModel
Used 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:
isModelElement
in interfaceIModel
- Overrides:
isModelElement
in classModel
- Parameters:
instance
- the Java object to test.- Returns:
- true if and only if instance can be contained by this model.
-
hasType
-
store
-
store
public boolean store() -
getPropertyGetter
- Specified by:
getPropertyGetter
in interfaceIModel
- Overrides:
getPropertyGetter
in classModel
-
getPropertySetter
- Specified by:
getPropertySetter
in interfaceIModel
- Overrides:
getPropertySetter
in classModel
-
toString
-