|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
mapss.dif.graph.hierarchy.HierarchyException
public class HierarchyException
This exception can be thrown by the methods in Hierarchy class. In addition to the exception functionality this class provides checks for maintaining stability and consistency in Hierarchy classes.
Hierarchy
,
Serialized FormConstructor Summary | |
---|---|
HierarchyException(java.lang.String message)
|
Method Summary | |
---|---|
static HierarchyException |
checkConnection(mocgraph.Edge edge,
Port port)
Checks if an edge can be connected to a port. |
static HierarchyException |
checkConnection(Port superPort,
Port subPort)
Checks if two ports can be connected. |
static HierarchyException |
checkFlatten(Hierarchy hierarchy,
mocgraph.Node node)
Checks if a super node in a hierarchy can be flattened without creating any errors or inconsistencies. |
static HierarchyException |
checkPort(Hierarchy hierarchy,
Port port)
Checks if port is suitable for adding to a hierarchy object. |
static HierarchyException |
checkSuperNode(Hierarchy parent,
Hierarchy child)
Checks if a node can be defined as a super node in a hierarchy. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HierarchyException(java.lang.String message)
message
- Error string which can be accessed using
getMessage()
method.Method Detail |
---|
public static HierarchyException checkConnection(mocgraph.Edge edge, Port port)
Returns an exception if any of the following statements is true:
edge
- Edge to be connected.port
- Port to be connected.
public static HierarchyException checkConnection(Port superPort, Port subPort)
Two ports can be connected only if their hierarchies are directly related (i.e. one is a super-hierarchy and the other one is a sub-hierarchy). Also directions of the ports should match.
superPort
- Port in the super-hierarchy.subPort
- Port in the sub-hierarchy.
public static HierarchyException checkFlatten(Hierarchy hierarchy, mocgraph.Node node)
Graph.addNode(mocgraph.Node)
and
Graph.addEdge(mocgraph.Edge)
),
checkSuperNode(mapss.dif.graph.hierarchy.Hierarchy, mapss.dif.graph.hierarchy.Hierarchy)
),
hierarchy
- Parent hierarchy.node
- Super node to be flattened.
public static HierarchyException checkPort(Hierarchy hierarchy, Port port)
Returns an exception if the name of the port already exists in the hierarchy that it is being added.
hierarchy
- Hierarchy to which the port will be added.port
- Port to be added to the hierarchy.
public static HierarchyException checkSuperNode(Hierarchy parent, Hierarchy child)
Returns an exception if any of the following statements is true:
CyclicHierarchyException
.
parent
- The hierarchy that contains the node.child
- Sub-hierarchy to be added.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |