public class HeapGXLWriter extends AbstractHeapGraphWriter
This class writes Java heap in Graph eXchange Language (GXL) format. GXL is an open standard for serializing arbitrary graphs in XML syntax.
A GXL document contains one or more graphs. A graph contains nodes and edges. Both nodes and edges can have attributes. graphs, nodes, edges and attributes are represented by XML elements graph, node, edge and attr respectively. Attributes can be typed. GXL supports locator, bool, int, float, bool, string, enum as well as set, seq, bag, tup types. Nodes must have a XML attribute 'id' that is unique id of the node in the GXL document. Edges must have 'from' and 'to' XML attributes that are ids of from and to nodes.
Java heap to GXL document mapping:
Java primitive to GXL type mapping:
javaLangClass, javaLangString, javaLangThread
Constructor and Description |
---|
HeapGXLWriter() |
Modifier and Type | Method and Description |
---|---|
void |
write(java.lang.String fileName)
writes the heap graph in the given file
|
protected void |
writeBooleanField(Oop oop,
BooleanField field) |
protected void |
writeByteField(Oop oop,
ByteField field) |
protected void |
writeCharField(Oop oop,
CharField field) |
protected void |
writeClass(Instance instance) |
protected void |
writeDoubleField(Oop oop,
DoubleField field) |
protected void |
writeFloatField(Oop oop,
FloatField field) |
protected void |
writeHeapFooter() |
protected void |
writeHeapHeader() |
protected void |
writeIntField(Oop oop,
IntField field) |
protected void |
writeLongField(Oop oop,
LongField field) |
protected void |
writeObjectArray(ObjArray array) |
protected void |
writeObjectFooter(Oop oop) |
protected void |
writeObjectHeader(Oop oop) |
protected void |
writePrimitiveArray(TypeArray array) |
protected void |
writeReferenceField(Oop oop,
OopField field) |
protected void |
writeShortField(Oop oop,
ShortField field) |
handleRuntimeException, isJavaVisible, write, writeGlobalJNIHandle, writeGlobalJNIHandles, writeHeapRecordEpilogue, writeHeapRecordPrologue, writeInstance, writeInternalObject, writeJavaThread, writeJavaThreads, writeObject, writeObjectFields, writeObjectFields, writeString, writeThread
public void write(java.lang.String fileName) throws java.io.IOException
HeapGraphWriter
java.io.IOException
protected void writeHeapHeader() throws java.io.IOException
writeHeapHeader
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeObjectHeader(Oop oop) throws java.io.IOException
writeObjectHeader
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeObjectFooter(Oop oop) throws java.io.IOException
writeObjectFooter
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeObjectArray(ObjArray array) throws java.io.IOException
writeObjectArray
in class AbstractHeapGraphWriter
java.io.IOException
protected void writePrimitiveArray(TypeArray array) throws java.io.IOException
writePrimitiveArray
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeClass(Instance instance) throws java.io.IOException
writeClass
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeReferenceField(Oop oop, OopField field) throws java.io.IOException
writeReferenceField
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeByteField(Oop oop, ByteField field) throws java.io.IOException
writeByteField
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeCharField(Oop oop, CharField field) throws java.io.IOException
writeCharField
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeBooleanField(Oop oop, BooleanField field) throws java.io.IOException
writeBooleanField
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeShortField(Oop oop, ShortField field) throws java.io.IOException
writeShortField
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeIntField(Oop oop, IntField field) throws java.io.IOException
writeIntField
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeLongField(Oop oop, LongField field) throws java.io.IOException
writeLongField
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeFloatField(Oop oop, FloatField field) throws java.io.IOException
writeFloatField
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeDoubleField(Oop oop, DoubleField field) throws java.io.IOException
writeDoubleField
in class AbstractHeapGraphWriter
java.io.IOException
protected void writeHeapFooter() throws java.io.IOException
writeHeapFooter
in class AbstractHeapGraphWriter
java.io.IOException
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.