|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.insane.scanner.SimpleXmlVisitor
public final class SimpleXmlVisitor
A visitor that stores the heap graph to a XML file in a simple format, which was used by the original Insane implementation. Usage pattern:
SimpleXmlVisitor visitor = new SimpleXmlVisitor(new File("/tmp/insane.xml")); ScannerUtils.scan(null, visitor, rotset, true); visitor.close();
Constructor Summary | |
---|---|
SimpleXmlVisitor(java.io.File to)
Creates a new instance of SimpleXmlVisitor |
Method Summary | |
---|---|
void |
close()
|
void |
visitArrayReference(ObjectMap map,
java.lang.Object from,
java.lang.Object to,
int index)
A new reference to target object was found. |
void |
visitClass(java.lang.Class cls)
A new type was found. |
void |
visitObject(ObjectMap map,
java.lang.Object obj)
A new object instance was found. |
void |
visitObjectReference(ObjectMap map,
java.lang.Object from,
java.lang.Object to,
java.lang.reflect.Field ref)
A reference from object from to object to
was found as the contents of the field ref . |
void |
visitStaticReference(ObjectMap map,
java.lang.Object to,
java.lang.reflect.Field ref)
A new reference static reference to target object was found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleXmlVisitor(java.io.File to) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void close() throws java.io.IOException
java.io.IOException
public void visitClass(java.lang.Class cls)
Visitor
visitClass
in interface Visitor
cls
- the new type found.public void visitObject(ObjectMap map, java.lang.Object obj)
Visitor
visitObject
in interface Visitor
map
- The ObjectMap
containing this object.obj
- the reported instance.public void visitObjectReference(ObjectMap map, java.lang.Object from, java.lang.Object to, java.lang.reflect.Field ref)
Visitor
from
to object to
was found as the contents of the field ref
.
It is guaranteed that both from
and to
objects
will be reported before the reference.
visitObjectReference
in interface Visitor
map
- The ObjectMap
containing the objects.from
- The object from which the reference sources.to
- The object to which the reference points.ref
- The representation of the reference. Describes the class
the referring field is declared in, and how it is named.public void visitStaticReference(ObjectMap map, java.lang.Object to, java.lang.reflect.Field ref)
Visitor
to
object will be reported before
the reference.
visitStaticReference
in interface Visitor
map
- The ObjectMap
containing the object.to
- The object to which the reference points.ref
- The representation of the reference. Describes the class
the referring field is declared in, and how it is named.public void visitArrayReference(ObjectMap map, java.lang.Object from, java.lang.Object to, int index)
Visitor
to
is referenced by index
-th slot of the array from
It is guaranteed that both from
and to
objects
will be reported before the reference.
visitArrayReference
in interface Visitor
map
- The ObjectMap
containing the objects.from
- The object from which the reference sources.to
- The object to which the reference points.index
- The array index of the to reference in
from
array.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |