Public Member Functions

de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance Interface Reference

A global instance is an instance of a model element that is denoted by a full path. More...

List of all members.

Public Member Functions

AbstractArchitectureModel getArchitectureModel ()
 Returns the referenced architecture model.
public< T extends
IAXLangElement > T 
getInstantiatedElement ()
 Returns the instantiated element.
List< IAXLangElementgetInstantiatedElements ()
 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).

Detailed Description

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.

Author:
mgrosse
ekleinod
Version:
0.9.0
Since:
0.9.0

Member Function Documentation

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.

Returns:
the referenced 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 (  ) 
List<IAXLangElement> de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.getInstantiatedElements (  ) 

Returns a list of the instantiated elements.

Returns:
list of the instantiated elements
Return values:
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.

Returns:
the parent instance
Return values:
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.

Returns:
the referenced 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

  • if the instantiated element is a signal at a port, the method returns true for isAt(Port.class)
  • if the instantiated element is a signal in a subcomponent, the method returns true for isAt(SubComponent.class)
  • if the instantiated element is a service in a subcomponent, the method returns true for isAt(SubComponent.class)
  • if the instantiated element is an alternative service, the method returns true for isAt(Service.class)
Parameters:
theClass class to check
Returns:
is the instantiated element located at an element of the given class

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.

Parameters:
theContext context to test
Returns:
is this instance in the given context?
Return values:
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 (  ) 
boolean de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.removeParentInstance (  ) 

Removes the parent instance reference.

Returns:
remove success
Return values:
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:

  • the parent instance, theOldContext, and theNewContext are not null
  • the parent instance is theOldContext
Parameters:
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 ( newInstantiatedElement  )  throws AXLException
void de.fraunhofer.isst.axbench.axlang.api.IGlobalInstance.setParentInstance ( IGlobalInstance  newParentInstance  )  throws AXLException

Sets the parent instance reference.

Parameters:
newParentInstance the new parent instance
Exceptions:
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.

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).

Parameters:
theSeparator separator string
theContext context of the output path
Returns:
the global instance in string representation

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.

Parameters:
theSeparator separator string
theContext context of the output path
bShowComponents flag, if component identifiers should be shown (true) or not (false)
Returns:
the global instance in string representation

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).

Parameters:
theSeparator separator string
Returns:
the global instance in string representation

Implemented in de.fraunhofer.isst.axbench.axlang.elements.globalinstances.AbstractGlobalInstance, and de.fraunhofer.isst.axbench.axlang.elements.globalinstances.ConnectionPathInstance.