|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mmtk.utility.statistics.Xml
public class Xml
Utility class for writing statistics out in XML format.
| Constructor Summary | |
|---|---|
Xml()
|
|
| Method Summary | |
|---|---|
static void |
attribute(String name,
boolean value)
Add a boolean-valued attribute to an open XML tag. |
static void |
attribute(String name,
byte[] value)
Add a byte[]-valued attribute to an open XML tag. |
static void |
attribute(String name,
double value)
Add a double-valued attribute to an open XML tag. |
static void |
attribute(String name,
int value)
Add an int-valued attribute to an open XML tag. |
static void |
attribute(String name,
long value)
Add a long-valued attribute to an open XML tag. |
static void |
attribute(String name,
String value)
Add a String-valued attribute to an open XML tag. |
static void |
attribute(String name,
Word value)
Add a word-valued attribute to an open XML tag. |
static void |
begin()
Mark the start of XML output |
static void |
closeAttribute()
Close an attribute (actually a simple close-quote) |
static void |
closeComment()
Close an XML comment |
static void |
closeMinorTag()
Close a tag with a "/>" |
static void |
closeTag(boolean close)
End a tag, optionally closing it (if it is a simple entity) |
static void |
closeTag(boolean close,
boolean endLine)
End a tag, optionally closing it (if it is a simple entity), and optionally printing end-of-line |
static void |
closeTag(String name)
Close the innermost XML tag and pop it from the stack. |
static void |
comment(String comment)
Add a comment, bracketing it with open- and close-comment tags. |
static void |
configItem(String name,
boolean value)
Output a "config" entity, with a given name and booleanvalue. |
static void |
configItem(String name,
String value)
Output a "config" entity, with a given name and Stringvalue. |
static void |
end()
Mark the end of XML output |
static void |
openAttribute(String name)
Open an attribute (write "{name}=\") |
static void |
openComment()
Open an XML comment |
static void |
openMinorTag(String name)
Open a tag without pushing it on the tag stack - must end this with a call to closeMinorTag() |
(package private) static void |
openTag(String name)
Open a simple XML entity. |
(package private) static void |
openTag(String name,
boolean endTag)
Open an XML tag. |
static void |
singleValue(String name,
double value)
Convenience version of singleValue where units are not specified. |
static void |
singleValue(String name,
double value,
String units)
Output a "stat" entity, with a given name, doublevalue and optionally, units. |
static void |
singleValue(String name,
long value)
Convenience version of singleValue where units are not specified. |
static void |
singleValue(String name,
long value,
String units)
Output a "stat" entity, with a given name, long value and
optionally, units. |
static void |
startTag()
Start a tag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Xml()
| Method Detail |
|---|
public static void begin()
public static void end()
public static void closeTag(String name)
static void openTag(String name,
boolean endTag)
name - Tag nameendTag - Should the tag be closed, or left open for
adding additional attributesstatic void openTag(String name)
name - Name of the entity
public static void singleValue(String name,
double value,
String units)
doublevalue and optionally, units.
name - Name of the entityvalue - The value of the entityunits - The units, or null for no units.
public static void singleValue(String name,
double value)
name - Name of the entityvalue - The value of the entity
public static void configItem(String name,
boolean value)
booleanvalue.
name - Name of the entityvalue - The value of the entity
public static void configItem(String name,
String value)
Stringvalue.
name - Name of the entityvalue - The value of the entity
public static void singleValue(String name,
long value,
String units)
long value and
optionally, units.
name - Name of the entityvalue - The value of the entityunits - The units, or null for no units.
public static void singleValue(String name,
long value)
name - Name of the entityvalue - The value of the entity
public static void attribute(String name,
Word value)
name - Name of the entityvalue - The value of the entity
public static void attribute(String name,
byte[] value)
name - Name of the entityvalue - The value of the entity
public static void attribute(String name,
String value)
name - Name of the entityvalue - The value of the entity
public static void attribute(String name,
boolean value)
name - Name of the entityvalue - The value of the entity
public static void attribute(String name,
double value)
name - Name of the entityvalue - The value of the entity
public static void attribute(String name,
long value)
name - Name of the entityvalue - The value of the entity
public static void attribute(String name,
int value)
name - Name of the entityvalue - The value of the entitypublic static void closeAttribute()
public static void openAttribute(String name)
name - Name of the entitypublic static void startTag()
public static void closeTag(boolean close)
close - If true, close the tag with "/>" rather than ">"
public static void closeTag(boolean close,
boolean endLine)
close - If true, close the tag with "/>" rather than ">"endLine - If true end the current line.public static void closeMinorTag()
public static void openMinorTag(String name)
name - Name of the entitypublic static void openComment()
public static void closeComment()
public static void comment(String comment)
comment - The comment.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||