public class ProcessContainer.Processor
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
ProcessContainer.Processor(java.lang.Object[] toplevel)
Constructor provided a predefined top level windows array.
|
ProcessContainer.Processor(java.lang.Object container,
int level)
Constructor with default use of System.out as OutputStream
|
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.String |
genRecogString(PCTree pctree,
java.lang.Object container,
java.lang.String parentText)
Deduce the recognition string for the container object and store that
along with associated object information in the PCTree.
|
(package private) java.lang.String |
getObjectProperty(java.lang.Object object,
java.lang.String property)
Return an individual object property from the application JVM.
|
PCTree |
getPCTree()
Accessor for hierarchy information
|
protected void |
makeIndent()
Increase our output indention based on the depth (level) of the hierarchy
being processed.
|
protected java.lang.String |
makeName(java.lang.String text,
java.lang.String compType)
Make a name based on the 'text', or if no text, then the 'compType';
Make sure to remove all non-alphanumeric characters first
When a name is already in our 'map' then we append
an index after the name to make it unique, starting from 2.
|
(package private) PCTree |
processChildren(java.lang.Object[] children,
java.lang.String text,
PCTree parent)
Process the children of a parent Processor,
children can be null because this method first checks for that.
|
void |
processParent()
The primary entry point for processing the initial object.
|
void |
run()
The Thread.start entry point.
|
void |
setParentText(java.lang.String text)
Accessor for parentText
|
void |
setPCTree(PCTree atree)
Accessor for hierarchy information
|
protected void |
write(java.lang.String data)
write a line of (indented) text to our preset OutputStream.
|
protected void |
writeMap(java.lang.String data)
write a line of text to our preset AppMap OutputStream.
|
protected void |
writeProperties(java.lang.Object container)
Get and output the full list of available properties for the container.
|
protected void |
writeTree(PCTree tree)
Write the raw tree data to System.out and the writeMap function.
|
public ProcessContainer.Processor(java.lang.Object container, int level)
public ProcessContainer.Processor(java.lang.Object[] toplevel)
public void run()
run
in interface java.lang.Runnable
protected void makeIndent()
public void setPCTree(PCTree atree)
public PCTree getPCTree()
public void setParentText(java.lang.String text)
public void processParent()
PCTree processChildren(java.lang.Object[] children, java.lang.String text, PCTree parent)
children,
- Object[] generally retrieved from the processed parent.text,
- String the text identifying the parent for setParentTextparent,
- PCTree the current state of stored hierarchy infojava.lang.String getObjectProperty(java.lang.Object object, java.lang.String property)
java.lang.String genRecogString(PCTree pctree, java.lang.Object container, java.lang.String parentText)
pctree
- PCTree, stores the rcognition string infocontainer,
- ObjectparentText,
- String, for menus, it is the path of our parentprotected java.lang.String makeName(java.lang.String text, java.lang.String compType)
text,
- StringcompType,
- Stringprotected void write(java.lang.String data)
protected void writeMap(java.lang.String data)
protected void writeProperties(java.lang.Object container)
protected void writeTree(PCTree tree)
tree
- stored PCTree hierarchy of our processing.writeMap(String)