public class Serializer
extends java.lang.Object
Style instances.| Modifier and Type | Method and Description |
|---|---|
static Serializer |
forClassLoader(java.lang.ClassLoader classLoader)
Creates or retrieves a
Serializer. |
java.lang.Class |
getClass(java.lang.String type)
Returns a
Class based on an XML type value. |
SerialPropertyPeer |
getSerialPropertyPeer(org.w3c.dom.Element propertyElement)
Retrieves a
SerialPropertyPeer specified by a type name in a property DOM element, if possible. |
Style |
loadStyle(SerialContext serialContext,
java.lang.String componentType,
org.w3c.dom.Element containerElement)
Creates a
Style object based on an XML property container. |
public static Serializer forClassLoader(java.lang.ClassLoader classLoader)
Serializer.classLoader - the ClassLoader to use for
dynamically loading peer classesSerializerpublic java.lang.Class getClass(java.lang.String type)
throws java.lang.ClassNotFoundException
Class based on an XML type value.
The provided type may be a java.lang shorthand, e.g., "s" for string, "b" for boolean.
If the provided type is not fully qualified, a standard Echo property type is assumed, e.g.
"Extent" will return the nextapp.echo.app.Extent class.
If the property type is fully qualified, it will simply be loaded by the classloader.type - the XML type valueClassjava.lang.ClassNotFoundException - in the event that no class exists with the specified typepublic SerialPropertyPeer getSerialPropertyPeer(org.w3c.dom.Element propertyElement) throws SerialException
SerialPropertyPeer specified by a type name in a property DOM element, if possible.
Returns null in the event no type name is specified.propertyElement - the property element, which may or may not specify a "t" attribute specifying the type nameSerialPropertyPeer, if it can be determinedSerialExceptionpublic Style loadStyle(SerialContext serialContext, java.lang.String componentType, org.w3c.dom.Element containerElement) throws SerialException
Style object based on an XML property container.serialContext - the SerialContext providing contextual information about the serializationcomponentType - the component type for which the Style will be usedcontainerElement - the DOM element containing the style propertiesStyleSerialException