|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.comp.Util
Utilities to manipulate the "path" of a component/port.
| Nested Class Summary | |
static class |
Util.Link
The class describes a uni-directional connection between two ports. |
| Field Summary | |
static java.lang.String |
BI_ATTACH
|
static java.lang.String |
BI_CONNECT
|
static java.lang.String |
FROM_ATTACH
|
static java.lang.String |
FROM_CONNECT
|
static java.lang.String |
NO_CONNECT
|
static boolean |
OPTIMIZED
|
static java.lang.String |
TO_ATTACH
|
static java.lang.String |
TO_CONNECT
|
static java.lang.String |
VERROR_IN
|
static java.lang.String |
VERROR_IN2
|
static java.lang.String |
VERROR_INFOPORT
|
static java.lang.String |
VERROR_INOUT
|
static java.lang.String |
VERROR_INOUT_IN
|
static java.lang.String |
VERROR_INOUT_OUT
|
static java.lang.String |
VERROR_OK
|
static java.lang.String |
VERROR_OUT
|
static java.lang.String |
VERROR_OUT2
|
| Constructor Summary | |
Util()
|
|
| Method Summary | |
static java.util.Hashtable |
adjust(java.util.Hashtable topology_,
java.lang.Object transparent_)
Adjusts the explored topology by making the components of the specified class/component transparent. |
static java.util.Hashtable |
adjust(java.util.Hashtable topology_,
java.lang.Object[] transparentObjs_,
java.lang.Object[] excludedObjs_)
Adjusts the explored topology by making the components of the specified class/component transparent. |
static java.util.Hashtable |
adjust(java.util.Hashtable topology_,
java.lang.Object[] transparentObjs_,
java.lang.Object[] excludedObjs_,
boolean verbose_)
Adjusts the explored topology by making the components of the specified class/component transparent. |
static java.lang.String |
checkConnect(Port p1_,
Port p2_)
Checks if two ports are connected and the type of connection if there is any. |
static java.lang.String |
compare(Component c1_,
Component c2_)
Does a structural comparison between two components. |
static java.lang.String |
compare(Port p1_,
Port p2_)
Does a structural comparison between two ports. |
static boolean |
contains(Component container_,
Component child_)
Returns true if the container_ component is an ancester of
the child_ component. |
static long |
count(Component root_)
Returns the number of components inside root_. |
static java.util.Hashtable |
explore(Component[] targets_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_,
boolean verbose_)
Explores the topology seen from the specified components in a hierarchical mannger. |
static java.util.Hashtable |
explore(Component target_,
java.lang.Object transparent_)
Explores the topology seen from the specified component in a hierarchical mannger. |
static java.util.Hashtable |
explore(Component target_,
java.lang.Object[] transparent_)
Explores the topology seen from the specified component in a hierarchical mannger. |
static java.util.Hashtable |
explore(Component target_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_)
Explores the topology seen from the specified component in a hierarchical mannger. |
static java.util.Hashtable |
explore(Component target_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_,
boolean verbose_)
Explores the topology seen from the specified component in a hierarchical mannger. |
static java.util.Hashtable |
exploreFlat(Component[] targets_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_,
boolean verbose_)
Explores the topology seen from the specified components in a "flat" (as opposed to "hierarchical") mannger. |
static java.util.Hashtable |
exploreFlat(Component target_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_)
Explores the topology seen from the specified component in a "flat" (as opposed to "hierarchical") mannger. |
static java.util.Hashtable |
exploreFlat(Component target_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_,
boolean verbose_)
Explores the topology seen from the specified component in a "flat" (as opposed to "hierarchical") mannger. |
static Component[] |
getAllComponents(Component root_)
Returns all components in the component hierarchy, including root_. |
static java.lang.String[] |
getAllPortGroupIDs(Component c_)
Returns the ID's of all port groups being created in the component. |
static java.lang.String |
getAllProperties(Component c_)
Returns all the properties of the component. |
static java.beans.PropertyDescriptor[] |
getAllPropertyDescriptors(java.lang.Object c_)
Returns all the properties of the component/object. |
static Wire[] |
getAllWires(Component root_)
Returns all wires in the component hierarchy. |
static ForkManager |
getForkManager(Component c_)
Returns the associated ForkManager of the component. |
static java.lang.String |
getFullID(Component o_)
Returns the full path of a component. |
static java.lang.String |
getID(Component o_,
java.lang.Class stopClass_)
Returns the partial path of a component starting from the closest ancester that belongs to the given class. |
static java.lang.String |
getID(Component o_,
Component stop_)
Returns the partial path of a component starting from the stop_ ancester. |
static Util.Link[] |
getLinks(Component target_)
Explores a component's neighbors in a hierarchical mannger. |
static Util.Link[] |
getLinks(Port p_)
Explores a port's peers in a hierarchical mannger. |
static java.lang.String |
getPortFullID(Port p_)
Returns the full path of a port. |
static java.lang.String |
getPortFullID(Port p_,
boolean type_)
Returns the full path of a port. |
static java.lang.String |
getPortID(Port p_)
Returns the canonical form of the port ID. |
static java.lang.String |
getPortID(Port p_,
java.lang.Class stopClass_)
Returns the partial path of a port starting from the closest ancester that belongs to the given class. |
static java.lang.String |
getPortID(Port p_,
java.lang.Class stopClass_,
boolean type_)
Returns the partial path of a port starting from the closest ancester that belongs to the given class. |
static java.lang.String |
getPortID(Port p_,
Component stop_)
Returns the partial path of a port starting from the stop_
ancester. |
static java.lang.String |
getPortID(Port p_,
Component stop_,
boolean type_)
Returns the partial path of a port starting from the stop_
ancester. |
static java.lang.String |
getProperty(Component c_,
java.lang.String pname_)
Returns the property of the component in String. |
static ACARuntime |
getRuntime(Component c_)
Returns the associated runtime ( ACARuntime) of the component. |
static void |
inject(java.lang.Object data_,
java.lang.Object port_)
Injects data_ at the specified port(s). |
static void |
inject(java.lang.Object data_,
java.lang.Object[] ports_)
Injects data_ at the specified ports. |
static Component |
load(java.io.ObjectInputStream in_)
Loads a component hierarchy from the ObjectInputStream. |
static java.lang.String |
lockinfo(Component c_)
Returns the report of the lock information in the component. |
static void |
main(java.lang.String[] args)
Component property tester. |
static java.beans.PropertyDescriptor[] |
makePropertyDescriptors(java.lang.String[] properties_,
java.lang.Class beanClass_,
java.lang.Class refClass_)
Makes the java.beans.PropertyDescriptors for the class. |
static void |
operate(java.lang.Object[] cc_,
java.lang.String operation_)
Starts/stops/resumes components. |
static void |
optimize(Component root_)
|
static Component |
resolvePath(java.lang.String path_,
Component start_)
Returns the component, given a relative path and the starting component of the path. |
static void |
save(java.io.ObjectOutputStream s_,
Component subroot_)
Saves the component hierarchy with the given root to the ObjectOutputStream. |
static Component |
sClone(Component comp_)
Returns a clone of this component using object serialization. |
static void |
setForkManager(Component c_,
ForkManager fm_)
Associates the ForkManager to the component. |
static void |
setRuntime(Component c_,
ACARuntime m_)
Associates the runtime ( ACARuntime) to the component. |
static java.lang.String |
showConnections(Component c_)
Returns a report of the connections inside the component. |
static java.lang.String |
showConnections(Component c_,
boolean showNoConn_,
boolean showType_,
boolean showHidden_,
boolean showOutside_)
Returns a report of the connections inside the component. |
static java.util.Hashtable |
verify(Component[] components_,
boolean recursive_)
Verifies the connections inside the specified container component. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean OPTIMIZED
public static final java.lang.String BI_CONNECT
public static final java.lang.String TO_CONNECT
public static final java.lang.String FROM_CONNECT
public static final java.lang.String NO_CONNECT
public static final java.lang.String BI_ATTACH
public static final java.lang.String TO_ATTACH
public static final java.lang.String FROM_ATTACH
public static final java.lang.String VERROR_IN
public static final java.lang.String VERROR_IN2
public static final java.lang.String VERROR_OUT
public static final java.lang.String VERROR_OUT2
public static final java.lang.String VERROR_INOUT_IN
public static final java.lang.String VERROR_INOUT_OUT
public static final java.lang.String VERROR_INOUT
public static final java.lang.String VERROR_OK
public static final java.lang.String VERROR_INFOPORT
| Constructor Detail |
public Util()
| Method Detail |
public static java.lang.String[] getAllPortGroupIDs(Component c_)
public static java.lang.String getFullID(Component o_)
public static java.lang.String getID(Component o_,
Component stop_)
stop_ ancester.
public static java.lang.String getID(Component o_,
java.lang.Class stopClass_)
public static java.lang.String getPortFullID(Port p_)
public static java.lang.String getPortFullID(Port p_,
boolean type_)
type_ - set to true to show the port type.
public static java.lang.String getPortID(Port p_,
Component stop_)
stop_
ancester.
Port name and type are not shown.
public static java.lang.String getPortID(Port p_,
Component stop_,
boolean type_)
stop_
ancester.
type_ - set to true to show the port type.
public static java.lang.String getPortID(Port p_,
java.lang.Class stopClass_)
public static java.lang.String getPortID(Port p_,
java.lang.Class stopClass_,
boolean type_)
type_ - set to true to show the port type.public static java.lang.String getPortID(Port p_)
public static Component resolvePath(java.lang.String path_,
Component start_)
public static java.lang.String compare(Component c1_,
Component c2_)
public static java.lang.String compare(Port p1_,
Port p2_)
public static boolean contains(Component container_,
Component child_)
container_ component is an ancester of
the child_ component.
public static java.lang.String checkConnect(Port p1_,
Port p2_)
BI_CONNECT,
TO_CONNECT(-->), FROM_CONNECT(<--) or
NO_CONNECT) and the attachment result (BI_ATTACH,
TO_ATTACH or FROM_ATTACH).public static java.lang.String showConnections(Component c_)
public static java.lang.String showConnections(Component c_,
boolean showNoConn_,
boolean showType_,
boolean showHidden_,
boolean showOutside_)
showNoConn_ - set to true to include unconnected ports in the report.showType_ - set to true to include port type in the report.showHidden_ - set to true to include hidden ports in the report.showOutside_ - set to true to include connections that go outside of
the component.public static Component sClone(Component comp_)
public static void save(java.io.ObjectOutputStream s_,
Component subroot_)
public static Component load(java.io.ObjectInputStream in_)
public static void setRuntime(Component c_,
ACARuntime m_)
ACARuntime) to the component.
public static ACARuntime getRuntime(Component c_)
ACARuntime) of the component.
public static void setForkManager(Component c_,
ForkManager fm_)
ForkManager to the component.
public static ForkManager getForkManager(Component c_)
ForkManager of the component.
public static void operate(java.lang.Object[] cc_,
java.lang.String operation_)
public static void inject(java.lang.Object data_,
java.lang.Object[] ports_)
data_ at the specified ports.
public static void inject(java.lang.Object data_,
java.lang.Object port_)
data_ at the specified port(s).
public static java.util.Hashtable verify(Component[] components_,
boolean recursive_)
public static Util.Link[] getLinks(Port p_)
public static Util.Link[] getLinks(Component target_)
public static java.util.Hashtable explore(Component target_,
java.lang.Object transparent_)
target_ - the specified component.transparent_ - class/component to be transparent during exploration.
Util.Link[]).
public static java.util.Hashtable explore(Component target_,
java.lang.Object[] transparent_)
target_ - the specified component.transparent_ - array of classes/components to be transparent during
exploration.
Util.Link[]).
public static java.util.Hashtable explore(Component target_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_)
target_ - the specified component.transparent_ - array of classes to be transparent during exploration.excluded_ - is the array of classes to be excluded.
public static java.util.Hashtable explore(Component target_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_,
boolean verbose_)
target_ - the specified component.transparent_ - array of classes to be transparent during exploration.excluded_ - is the array of classes to be excluded.
public static java.util.Hashtable explore(Component[] targets_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_,
boolean verbose_)
targets_ - the specified components.transparent_ - array of classes to be transparent during exploration.excluded_ - is the array of classes to be excluded.
public static java.util.Hashtable exploreFlat(Component target_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_)
target_ - the specified component.transparent_ - array of classes to be transparent during exploration.excluded_ - is the array of classes to be excluded.
public static java.util.Hashtable exploreFlat(Component target_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_,
boolean verbose_)
target_ - the specified component.transparent_ - array of classes to be transparent during exploration.excluded_ - is the array of classes to be excluded.
public static java.util.Hashtable exploreFlat(Component[] targets_,
java.lang.Object[] transparent_,
java.lang.Object[] excluded_,
boolean verbose_)
targets_ - the specified components.transparent_ - array of classes to be transparent during exploration.excluded_ - is the array of classes to be excluded.
public static java.util.Hashtable adjust(java.util.Hashtable topology_,
java.lang.Object transparent_)
topology_ - is a hashtable mapping from a component to
Util.Link[].transparent_ - is the class/component to be treated transparently.
- Returns:
- the new topology.
public static java.util.Hashtable adjust(java.util.Hashtable topology_,
java.lang.Object[] transparentObjs_,
java.lang.Object[] excludedObjs_)
topology_ - is a hashtable mapping from a component to
Util.Link[].transparentObjs_ - is the array of classes to be treated
transparently.excludedObjs_ - is the array of classes/components to be excluded.
- Returns:
- the new topology.
public static java.util.Hashtable adjust(java.util.Hashtable topology_,
java.lang.Object[] transparentObjs_,
java.lang.Object[] excludedObjs_,
boolean verbose_)
topology_ - is a hashtable mapping from a component to
Util.Link[].transparentObjs_ - is the array of classes to be treated
transparently.excludedObjs_ - is the array of classes/components to be excluded.
- Returns:
- the new topology.
public static java.lang.String lockinfo(Component c_)
public static java.lang.String getAllProperties(Component c_)
public static java.beans.PropertyDescriptor[] getAllPropertyDescriptors(java.lang.Object c_)
public static java.lang.String getProperty(Component c_,
java.lang.String pname_)
public static java.beans.PropertyDescriptor[] makePropertyDescriptors(java.lang.String[] properties_,
java.lang.Class beanClass_,
java.lang.Class refClass_)
java.beans.PropertyDescriptors for the class.
public static long count(Component root_)
root_.
public static void optimize(Component root_)
public static Wire[] getAllWires(Component root_)
public static Component[] getAllComponents(Component root_)
root_.
public static void main(java.lang.String[] args)
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||