public abstract class GraphAnalyzer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GraphAnalyzer.IndexedList
A pair of a list and an index number.
|
static class |
GraphAnalyzer.IndexedLists
A list of IndexedLists.
|
static class |
GraphAnalyzer.Path
A path between two ports.
|
Constructor and Description |
---|
GraphAnalyzer() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
_isIgnored(java.lang.Object object)
Test whether an object should be ignored from analysis.
|
protected abstract boolean |
_isOpaque(CompositeEntity entity)
Test whether a composite entity should be considered as opaque.
|
protected abstract boolean |
_relationCollapsing(NamedObj container)
Test whether the relations contained in the container should be
considered as collapsed, i.e., whether multiple connected relations
should be considered as just one.
|
NamedObj |
findFirstChild(CompositeEntity top,
GraphAnalyzer.IndexedLists indexedLists,
java.util.Collection<java.lang.Object> excludedObjects)
Find the first child within the top composite entity.
|
boolean |
findFirstPath(Port startPort,
GraphAnalyzer.Path path,
java.util.Set<? super Relation> visitedRelations,
java.util.Set<? super Port> visitedPorts)
Find the first path starting from the startPort, and store it
in the path parameter if found.
|
NamedObj |
findNextChild(CompositeEntity top,
GraphAnalyzer.IndexedLists indexedLists,
java.util.Collection<java.lang.Object> excludedObjects)
Find the next child within the top composite entity.
|
boolean |
findNextPath(GraphAnalyzer.Path path,
java.util.Set<Relation> visitedRelations,
java.util.Set<Port> visitedPorts)
Find the next path, and store it in the path parameter if
found.
|
public NamedObj findFirstChild(CompositeEntity top, GraphAnalyzer.IndexedLists indexedLists, java.util.Collection<java.lang.Object> excludedObjects)
AtomicActor
) or an opaque composite
entity, one that has a director in it. If the top composite entity does
not have any child, null is returned.top
- The top composite entity in which the search is performed.indexedLists
- A list that is used to encode the composite entities
visited.excludedObjects
- The atomic actor or opaque composite entities
that should not be returned.findNextChild(CompositeEntity, IndexedLists, Collection)
public boolean findFirstPath(Port startPort, GraphAnalyzer.Path path, java.util.Set<? super Relation> visitedRelations, java.util.Set<? super Port> visitedPorts)
Port
) and relations (Relation
),
starting and ending with two ports (which may be equal, in which case
the path is a loop). If a path contains ports between the start port and
the end port, those ports in between must be ports of a transparent
composite entities (those with no directors inside). If no path is found
starting from the startPort, null is returned.startPort
- The port from which the search starts.path
- The path to obtain the result.visitedRelations
- A set that records all the relations that have
been visited during the search.visitedPorts
- A set that records all the ports that have been
visited during the search.findNextPath(Path, Set, Set)
public NamedObj findNextChild(CompositeEntity top, GraphAnalyzer.IndexedLists indexedLists, java.util.Collection<java.lang.Object> excludedObjects)
AtomicActor
) or an opaque composite entity, one
that has a director in it. If the top composite entity does not have any
more child, null is returned.top
- The top composite entity in which the search is performed.indexedLists
- A list that is used to encode the composite entities
visited.excludedObjects
- The atomic actor or opaque composite entities
that should not be returned.findFirstChild(CompositeEntity, IndexedLists, Collection)
public boolean findNextPath(GraphAnalyzer.Path path, java.util.Set<Relation> visitedRelations, java.util.Set<Port> visitedPorts)
Port
) and
relations (Relation
), starting and ending with two ports (which
may be equal, in which case the path is a loop). If a path contains
ports between the start port and the end port, those ports in between
must be ports of a transparent composite entities (those with no
directors inside). If no more path is found, null is returned.path
- The path to obtain the result.visitedRelations
- A set that records all the relations that have
been visited during the search.visitedPorts
- A set that records all the ports that have been
visited during the search.findFirstPath(Port, Path, Set, Set)
protected boolean _isIgnored(java.lang.Object object)
object
- The object to be tested.protected abstract boolean _isOpaque(CompositeEntity entity)
entity
- The composite entity to be tested.protected abstract boolean _relationCollapsing(NamedObj container)
container
- The container.