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:
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private boolean | |
| private PrintWriter | |
| private List |
| Access | Constructor and Description |
|---|---|
| public |
| ENCODING | back to summary |
|---|---|
| private static final String ENCODING | |
| isArray | back to summary |
|---|---|
| private boolean isArray | |
| out | back to summary |
|---|---|
| private PrintWriter out | |
| refFields | back to summary |
|---|---|
| private List<OopField> refFields | |
| HeapGXLWriter | back to summary |
|---|---|
| public HeapGXLWriter() | |
| calculateOopDumpRecordSize | back to summary |
|---|---|
| protected int calculateOopDumpRecordSize(Oop oop) throws IOException Implements abstract sun.
| |
| escapeXMLChars | back to summary |
|---|---|
| private static String escapeXMLChars(String s) | |
| getID | back to summary |
|---|---|
| private static String getID(Oop oop) | |
| identifierToXMLName | back to summary |
|---|---|
| private static String identifierToXMLName(String name) | |
| write | back to summary |
|---|---|
| public void write(String fileName) throws IOException Implements sun. Doc from sun. writes the heap graph in the given file | |
| writeArrayLength | back to summary |
|---|---|
| private void writeArrayLength(Array array) throws IOException | |
| writeAttribute | back to summary |
|---|---|
| private void writeAttribute(String name, String type, String value) | |
| writeBooleanField | back to summary |
|---|---|
| protected void writeBooleanField(Oop oop, BooleanField field) throws IOException Overrides sun. | |
| writeByteField | back to summary |
|---|---|
| protected void writeByteField(Oop oop, ByteField field) throws IOException Overrides sun. | |
| writeCharField | back to summary |
|---|---|
| protected void writeCharField(Oop oop, CharField field) throws IOException Overrides sun. | |
| writeClass | back to summary |
|---|---|
| protected void writeClass(Instance instance) throws IOException Overrides sun. | |
| writeDoubleField | back to summary |
|---|---|
| protected void writeDoubleField(Oop oop, DoubleField field) throws IOException Overrides sun. | |
| writeEdge | back to summary |
|---|---|
| private void writeEdge(Oop from, Oop to, String name) throws IOException | |
| writeField | back to summary |
|---|---|
| private void writeField(Field field, String type, String kind, String value) throws IOException | |
| writeFloatField | back to summary |
|---|---|
| protected void writeFloatField(Oop oop, FloatField field) throws IOException Overrides sun. | |
| writeHeapFooter | back to summary |
|---|---|
| protected void writeHeapFooter() throws IOException Overrides sun. | |
| writeHeapHeader | back to summary |
|---|---|
| protected void writeHeapHeader() throws IOException Overrides sun. | |
| writeIntField | back to summary |
|---|---|
| protected void writeIntField(Oop oop, IntField field) throws IOException Overrides sun. | |
| writeLongField | back to summary |
|---|---|
| protected void writeLongField(Oop oop, LongField field) throws IOException Overrides sun. | |
| writeObjectArray | back to summary |
|---|---|
| protected void writeObjectArray(ObjArray array) throws IOException Overrides sun. | |
| writeObjectFooter | back to summary |
|---|---|
| protected void writeObjectFooter(Oop oop) throws IOException Overrides sun. | |
| writeObjectHeader | back to summary |
|---|---|
| protected void writeObjectHeader(Oop oop) throws IOException Overrides sun. | |
| writePrimitiveArray | back to summary |
|---|---|
| protected void writePrimitiveArray(TypeArray array) throws IOException Overrides sun. | |
| writeReferenceField | back to summary |
|---|---|
| protected void writeReferenceField(Oop oop, OopField field) throws IOException Overrides sun. | |
| writeShortField | back to summary |
|---|---|
| protected void writeShortField(Oop oop, ShortField field) throws IOException Overrides sun. | |
| writeVMInfo | back to summary |
|---|---|
| private void writeVMInfo() throws IOException | |