public interface MObject extends java.lang.Comparable<MObject>
The MObject services are obviously a subset of those provided by SmObjectImpl which is an internal implementation class of vcore.
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
accept(MVisitor v)
Accept a visitor.
|
void |
delete()
Delete the object from the model.
|
java.util.List<? extends MObject> |
getCompositionChildren()
Get the child objects in the composition graph.
|
MObject |
getCompositionOwner()
Get the object owning this object in the composition graph.
|
MClass |
getMClass()
Get the object metaclass.
|
java.lang.String |
getName()
Get the object name.
|
MStatus |
getStatus()
Get the object status flags.
|
java.lang.String |
getUuid()
Get the object unique identifier.
|
boolean |
isDeleted()
Tells whether the element is deleted in the model.
|
boolean |
isModifiable()
Tells whether the object can be modified
|
boolean |
isShell()
Tells whether the object is an unresolved reference.
|
boolean |
isValid()
Tells whether the object is usable.
|
java.lang.Object |
mGet(MAttribute att)
Get an attribute value
|
java.util.List<MObject> |
mGet(MDependency dep)
Get the given dependency content as a List.
|
void |
mSet(MAttribute att,
java.lang.Object value)
Set an attribute value
|
void |
setName(java.lang.String name)
Set the name of the object.
|
java.lang.Object accept(MVisitor v)
The Acyclic Visitor pattern allows new functions to be added to existing class hierarchies without affecting those hierarchies, and without creating the dependency cycles that are inherent to the GangOfFour VisitorPattern
v
- a visitorvoid delete()
java.util.List<? extends MObject> getCompositionChildren()
Navigates string composition dependencies and shared composition ones.
Beware: There are cycles in the composition graph computed using this method.
To avoid dealing with cycles you can use
CompositionGetter.getAllChildren(Collection
CompositionGetter.getAllChildren(java.util.Collection)
MObject getCompositionOwner()
null
if this object is orphan.MClass getMClass()
java.lang.String getName()
This method must never return null
.
MStatus getStatus()
The status flags tell for example whether the object is visible browsable, modifiable, its CMS state ...
java.lang.String getUuid()
boolean isDeleted()
A deleted object has the following behavior:
boolean isModifiable()
true
if the object can be modified else false
.boolean isShell()
A shell object is an object that is not present in any known repository but is referenced in another one.
A shell object has the following behavior:
true
if the object is unresolved, else false
.boolean isValid()
An object is usable if its modeling session and its repository is open and if the object is not deleted nor shell.
true
if the object is valid else false
.isDeleted()
,
isShell()
java.lang.Object mGet(MAttribute att)
att
- an attributejava.util.List<MObject> mGet(MDependency dep)
The returned list reflects the content of the dependency at any moment. Modifying the list will modify the dependency content.
dep
- the dependency to get.void mSet(MAttribute att, java.lang.Object value)
att
- an attributevalue
- its new value.void setName(java.lang.String name)
name
- the name of the object.