A global instance is an instance of a model element that is denoted by a full path. More...
Public Member Functions | |
AbstractArchitectureModel | getArchitectureModel () |
Returns the referenced architecture model. | |
public< T extends IAXLangElement > T | getInstantiatedElement () |
Returns the instantiated element. | |
List< IAXLangElement > | getInstantiatedElements () |
Returns a list of the instantiated elements. | |
IGlobalInstance | getParentInstance () |
Returns the parent instance. | |
Component | getTopComponent () |
Returns the referenced top component. | |
boolean | isAt (Class<?extends IAXLangElement > theClass) |
Returns if the instantiated element is located at an element of the given class. | |
boolean | isInContext (IGlobalInstance theContext) |
Returns if this instance is in the given context. | |
boolean | removeInstantiatedElement () |
Removes the instantiated element reference. | |
boolean | removeParentInstance () |
Removes the parent instance reference. | |
void | replaceContext (IGlobalInstance theOldContext, IGlobalInstance theNewContext) |
Replaces the context of this instance with a new context.. | |
public< T extends IAXLangElement > void | setInstantiatedElement (T newInstantiatedElement) throws AXLException |
Sets the instantiated element reference. | |
void | setParentInstance (IGlobalInstance newParentInstance) throws AXLException |
Sets the parent instance reference. | |
List< String > | toIdentifierList () |
Returns the complete list of identifiers or the instance. | |
String | toPathString (String theSeparator, IGlobalInstance theContext) |
Returns the global instance in string representation (separation of elements with separator) without the context, without component identifiers (except top component). | |
String | toPathString (String theSeparator, IGlobalInstance theContext, boolean bShowComponents) |
Returns the global instance in string representation (separation of elements with separator) without the context, with or without component identifiers. | |
String | toPathString (String theSeparator) |
Returns the global instance in string representation (separation of elements with separator), without component identifiers (except top component). |
A global instance is an instance of a model element that is denoted by a full path.
Each global instance consists of the parent global instance (which may be null
for architecture instances) and the instantiated element.
Convenience access methods are provided in order to ease the use of global instances for:
Another important method to define is: public static IGlobalInstance fromIdentifierList(List<String> lstIdentifiers, Model theModel);
Static methods cannot be defined in an interface.
AbstractArchitectureModel de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.getArchitectureModel | ( | ) |
Returns the referenced architecture model.
This is a convenience method for easy access to the architecture model.
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
public<T extends IAXLangElement> T de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.getInstantiatedElement | ( | ) |
Returns the instantiated element.
<T> | the type of the instantiated element |
null | if there is no instantiated element |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractConnectionInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractDataElementInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ApplicationModelInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.BusConnectionInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.BusDelegationInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ComponentInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ConnectionPathInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.FunctionInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.HWBusInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.PortInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ResourceModelInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.StorageInstance, and de.fraunhofer.isst.axbench.axlang.elements.globalinstances.SubComponentInstance.
List<IAXLangElement> de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.getInstantiatedElements | ( | ) |
Returns a list of the instantiated elements.
empty | if there is no instantiated element |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
IGlobalInstance de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.getParentInstance | ( | ) |
Returns the parent instance.
null | if there is no parent instance (i.e. this instance is an architecture instance) |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
Component de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.getTopComponent | ( | ) |
Returns the referenced top component.
This is a convenience method for easy access to the top component.
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
boolean de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.isAt | ( | Class<?extends IAXLangElement > | theClass | ) |
Returns if the instantiated element is located at an element of the given class.
Examples
true
for isAt(Port.class)
true
for isAt(SubComponent.class)
true
for isAt(SubComponent.class)
true
for isAt(Service.class)
theClass | class to check |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
boolean de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.isInContext | ( | IGlobalInstance | theContext | ) |
Returns if this instance is in the given context.
theContext | context to test |
true | is in context | |
false | is not in context |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
boolean de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.removeInstantiatedElement | ( | ) |
Removes the instantiated element reference.
true | instantiated element was removed, or instantiated element was null | |
false | instantiated element was not removed |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractConnectionInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractDataElementInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ApplicationModelInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.BusConnectionInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.BusDelegationInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ComponentInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ConnectionPathInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.FunctionInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.HWBusInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.PortInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ResourceModelInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.StorageInstance, and de.fraunhofer.isst.axbench.axlang.elements.globalinstances.SubComponentInstance.
boolean de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.removeParentInstance | ( | ) |
Removes the parent instance reference.
true | parent instance was removed, or parent instance was null | |
false | parent instance was not removed |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
void de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.replaceContext | ( | IGlobalInstance | theOldContext, | |
IGlobalInstance | theNewContext | |||
) |
Replaces the context of this instance with a new context..
This method replaces the context of the instantiated element with the new context if:
theOldContext
, and theNewContext
are not nulltheOldContext
theOldContext | the old context | |
theNewContext | the new context |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
public<T extends IAXLangElement> void de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.setInstantiatedElement | ( | T | newInstantiatedElement | ) | throws AXLException |
Sets the instantiated element reference.
<T> | the type of the instantiated element | |
newInstantiatedElement | the new instantiated element |
AXLException | if the reference to the new instantiated element cannot be set |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractConnectionInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractDataElementInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ApplicationModelInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.BusConnectionInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.BusDelegationInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ComponentInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ConnectionPathInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.FunctionInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.HWBusInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.PortInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ResourceModelInstance, de.fraunhofer.isst.axbench.axlang.elements.globalinstances.StorageInstance, and de.fraunhofer.isst.axbench.axlang.elements.globalinstances.SubComponentInstance.
void de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.setParentInstance | ( | IGlobalInstance | newParentInstance | ) | throws AXLException |
Sets the parent instance reference.
newParentInstance | the new parent instance |
AXLException | if the reference to the new architecture model cannot be set |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
List<String> de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.toIdentifierList | ( | ) |
Returns the complete list of identifiers or the instance.
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
String de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.toPathString | ( | String | theSeparator, | |
IGlobalInstance | theContext | |||
) |
Returns the global instance in string representation (separation of elements with separator) without the context, without component identifiers (except top component).
theSeparator | separator string | |
theContext | context of the output path |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
String de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.toPathString | ( | String | theSeparator, | |
IGlobalInstance | theContext, | |||
boolean | bShowComponents | |||
) |
Returns the global instance in string representation (separation of elements with separator) without the context, with or without component identifiers.
theSeparator | separator string | |
theContext | context of the output path | |
bShowComponents | flag, if component identifiers should be shown (true ) or not (false ) |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance.
String de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.toPathString | ( | String | theSeparator | ) |
Returns the global instance in string representation (separation of elements with separator), without component identifiers (except top component).
theSeparator | separator string |
Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance, and de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ConnectionPathInstance.