An element path is essentially a list of aXLang-elements, considered as an aXLang-element itself.
More...
List of all members.
Detailed Description
An element path is essentially a list of aXLang-elements, considered as an aXLang-element itself.
There are two concrete classes that extend ElementPath: InstancePath and ConnectionPath.
- Todo:
- Check if the normal de.fraunhofer.isst.axbench.axlang.api.IAXLangElement#addElement(IAXLangElement, ReferenceKind, Roles) methods can be used for storage of the path, similar to the parameter storage of de.fraunhofer.isst.axbench.axlang.elements.architecturemodel.Operation
- Author:
- cknoppek
-
ekleinod
-
mgrosse
- Version:
- 0.8.0
- Since:
- 0.7.2
Constructor & Destructor Documentation
de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.ElementPath |
( |
|
) |
|
Member Function Documentation
void de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.add |
( |
IAXLangElement |
newElement |
) |
|
Appends an element to the end of path and registers itself as listener to the element.
- Parameters:
-
void de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.addAll |
( |
List< IAXLangElement > |
newElements |
) |
|
Appends a list of elements to the end of the path.
- Parameters:
-
| newElements | list of new elements |
void de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.addAtIndex0 |
( |
IAXLangElement |
newElement |
) |
|
Adds an element to the path at index 0 and registers itself as listener to the element.
- Parameters:
-
IAXLangElement de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.clone |
( |
|
) |
|
boolean de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.contains |
( |
IAXLangElement |
axlElement |
) |
|
Makes a shallow copy of the path (the referenced elements are not cloned).
- Returns:
- copy of the element
static <TextendsElementPath> T de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.create |
( |
Class<?> |
pathType |
) |
[static, private] |
generic creation method
creates an empty path of one of the two known subtypes (InstancePath, ConnectionPath) of ElementPath
- Parameters:
-
| <T> | type of the created path, must be a subtype of ElementPath |
| pathType | desired type of the created path, must be a subtype of ElementPath |
- Returns:
- an empty path of type pathType, provided it is a subtype of ElementPath
- Return values:
-
| returns | null if pathType is neither InstancePath.class nor ConnectionPath.class |
void de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.elementRemoved |
( |
IAXLangElement |
axlElement |
) |
|
Reacts on removal of an element.
If an element of the path is removed, the whole path is invalid, it therefore has to be deleted.
- remove this element as listener from path elements
- clear path list
- remove path from parent
Check if parent is null
, this occurs if the path was deleted before.
- Parameters:
-
| axlElement | removed element |
boolean de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.equals |
( |
Object |
other |
) |
|
IAXLangElement de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.getFirstElement |
( |
|
) |
|
Returns the first element of the path.
- Returns:
- first element
- Return values:
-
| null | if the path is empty |
public<T extends ElementPath> T de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.getInitialTail |
( |
|
) |
[package] |
Returns the "initial tail" of the path, i.e. a path without the last element.
- Returns:
- initial tail of the path (without listeners)
- Return values:
-
| empty | path if there is no tail |
IAXLangElement de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.getLastElement |
( |
|
) |
|
Returns the last element of the path.
- Returns:
- last element
- Return values:
-
| null | if the path is empty |
IAXLangElement de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.getNextToLastElement |
( |
|
) |
|
Returns the next to last element of the path.
- Returns:
- next to last element
- Return values:
-
| null | if the path is to small |
String de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.getPathAsString |
( |
|
) |
|
public<T extends ElementPath> T de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.getTail |
( |
|
) |
[package] |
Returns the tail of the path, i.e. a path without the first element.
- Returns:
- tail of the path (without listeners)
- Return values:
-
| empty | path if there is no tail |
int de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.hashCode |
( |
|
) |
|
boolean de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.isEmpty |
( |
|
) |
|
Returns whether the path is empty, i.e. does not contain any elements.
- Returns:
- is path empty?
- Return values:
-
| true | path is empty |
| false | path is not empty |
boolean de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.isInitialSegmentOf |
( |
ElementPath |
otherInstancePath |
) |
|
checks whether the path is an initial piece of another path
- Parameters:
-
| otherInstancePath | the other (presumably longer) path this path is compared to |
- Returns:
- true if the path is an initial piece of the other path, else false
void de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.removeLastElement |
( |
|
) |
|
Removes the last element of the path.
void de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.removeNextToLastElement |
( |
|
) |
|
Removes the next to last element of the path.
List<String> de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.toIdentifierList |
( |
|
) |
|
Returns a list of identifiers stored in the path.
- Returns:
- list of identifiers
- Return values:
-
List<IAXLangElement> de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.toList |
( |
|
) |
|
Returns the list of elements building the path.
- Returns:
- list of path elements
String de.fraunhofer.isst.axbench.axlang.utilities.ElementPath.toString |
( |
|
) |
|
Member Data Documentation
list of aXLang elements that build the path