public interface MMetamodelFragment
The runtime metamodel of Modelio is composed of several fragments:
Metamodel fragments are often a port from a tool to Modelio and this porting may be made in several steps.
Modifier and Type | Method and Description |
---|---|
default void |
addDynamicBehavior(java.lang.String key,
java.lang.Object value)
Add a dynamic behavior for the specified key.
|
default <T> T |
getDynamicBehavior(java.lang.String key,
java.lang.Class<T> type)
Returns the dynamic behavior to which the specified key is mapped, or
null if this key has no mapping. |
java.lang.String |
getName()
The mandatory name of this metamodel fragment.
|
java.util.Collection<VersionedItem<MMetamodelFragment>> |
getNeededFragments() |
java.lang.String |
getProvider()
The optional name of the provider of this metamodel fragment, typically the vendor.
|
java.lang.String |
getProviderVersion()
The metamodel version for/from the provider tool.
|
Version |
getVersion()
The version of the metamodel fragment for Modelio.
|
boolean |
isExtension()
Tells whether this metamodel fragment is an extension
or a standard Modelio metamodel fragment.
|
boolean |
isFake()
Tells whether this metamodel fragment is a fake metamodel fragment.
|
default void |
removeDynamicBehavior(java.lang.String key,
java.lang.Object value)
Removes the dynamic behavior for the specified key only if it is currently mapped to the specified value.
|
java.lang.String getName()
Version getVersion()
Compatibility checking must be done as following:
java.lang.String getProvider()
java.lang.String getProviderVersion()
This provider metamodel version is purely informative and should reflect the metamodel version from the source tool.
Metamodel fragments are often a port from a tool to Modelio. This porting may be made in several steps. Each porting should result in an increase of the Modelio version. When the source tool metamodel changes, the Modelio version should be modified and the provider version should reflect the new metamodel version from the provider tool.
boolean isExtension()
By default all metamodel fragments are extension fragments.
Standard Modelio metamodel fragments are guaranteed to have no metaclass name collisions.
java.util.Collection<VersionedItem<MMetamodelFragment>> getNeededFragments()
boolean isFake()
default <T> T getDynamicBehavior(java.lang.String key, java.lang.Class<T> type)
null
if this key has no mapping.key
- the key whose associated behavior is to be returnedtype
- the class of the dynamic behavior to getnull
if key has no mappingjava.lang.ClassCastException
- if the mapped behavior does not match the given typedefault void addDynamicBehavior(java.lang.String key, java.lang.Object value)
key
- key with which the specified behavior is to be associatedvalue
- behavior to be associated with the specified keydefault void removeDynamicBehavior(java.lang.String key, java.lang.Object value)
key
- key with which the specified behavior is associatedvalue
- behavior expected to be associated with the specified key