NextApp Echo3
v3.0.b4

nextapp.echo.app.serial
Class Serializer

java.lang.Object
  extended by nextapp.echo.app.serial.Serializer

public class Serializer
extends java.lang.Object

Front-end for translating XML component/style to Style instances.


Method Summary
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.
 Style loadStyle(SerialContext serialContext, java.lang.String componentType, org.w3c.dom.Element containerElement)
          Creates a Style object based on an XML property container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forClassLoader

public static Serializer forClassLoader(java.lang.ClassLoader classLoader)
Creates or retrieves a Serializer.

Parameters:
classLoader - the ClassLoader to use for dynamically loading peer classes
Returns:
the Serializer

getClass

public java.lang.Class getClass(java.lang.String type)
                         throws java.lang.ClassNotFoundException
Returns a 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.

Parameters:
type - the XML type value
Returns:
the represented Class
Throws:
java.lang.ClassNotFoundException - in the event that no class exists with the specified type

loadStyle

public Style loadStyle(SerialContext serialContext,
                       java.lang.String componentType,
                       org.w3c.dom.Element containerElement)
                throws SerialException
Creates a Style object based on an XML property container.

Parameters:
serialContext - the SerialContext providing contextual information about the serialization
componentType - the component type for which the Style will be used
containerElement - the DOM element containing the style properties
Returns:
the generated Style
Throws:
SerialException

NextApp Echo3
v3.0.b4