public abstract class XMLContext extends FormatContext
A context for XML parsing/formatting. This context provides
the XMLFormat to parse/format objects
of any class. If not superseded, the XML format for a class is specified
by the DefaultXMLFormat
annotation.
A XML context always returns the most specialized format. If a class
has no default format annotation (inherited or not), then the default
Object format (with "value" attribute is
parsed/formatted using current
text format) is returned.
A predefined format exists for the following standard types:
TextFormat)
| Modifier | Constructor and Description |
|---|---|
protected |
XMLContext()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static XMLContext |
enter()
Enters and returns a new xml context instance.
|
static <T> XMLFormat<T> |
getFormat(Class<? extends T> type)
Returns the xml format for the specified type; if none defined
the default object xml format (based on
TextFormat) is returned. |
protected abstract <T> XMLFormat<T> |
searchFormat(Class<? extends T> type)
Searches the xml format for the specified type.
|
abstract <T> void |
setFormat(Class<? extends T> type,
XMLFormat<T> format)
Sets the xml format for the specified type (and its sub-types).
|
current, current, enter, enterInner, exit, getOuter, inherit, innerpublic static XMLContext enter()
public static <T> XMLFormat<T> getFormat(Class<? extends T> type)
TextFormat) is returned.public abstract <T> void setFormat(Class<? extends T> type, XMLFormat<T> format)
Copyright © 2017. All rights reserved.