org.codehaus.enunciate.contract.jaxb.types
Class XmlTypeFactory

java.lang.Object
  extended by org.codehaus.enunciate.contract.jaxb.types.XmlTypeFactory

public class XmlTypeFactory
extends java.lang.Object

A decorator that decorates the relevant type mirrors as xml type mirrors.

Author:
Ryan Heaton

Constructor Summary
XmlTypeFactory()
           
 
Method Summary
static XmlType findExplicitSchemaType(Accessor accessor)
          Finds the explicit schema type for the given accessor.
static XmlType findSpecifiedType(Adaptable adaptable)
          Find the specified type of the given adaptable element, if it exists.
static XmlType getXmlType(java.lang.Class type)
          Get the XML type for the specified type.
static XmlType getXmlType(com.sun.mirror.type.TypeMirror typeMirror)
          Get the XML type for the specified type mirror.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlTypeFactory

public XmlTypeFactory()
Method Detail

findSpecifiedType

public static XmlType findSpecifiedType(Adaptable adaptable)
                                 throws XmlTypeException
Find the specified type of the given adaptable element, if it exists.

Parameters:
adaptable - The adaptable element for which to find the specified type.
Returns:
The specified XML type, or null if it doesn't exist.
Throws:
XmlTypeException

findExplicitSchemaType

public static XmlType findExplicitSchemaType(Accessor accessor)
Finds the explicit schema type for the given accessor.

Parameters:
accessor - The accessor.
Returns:
The XML type, or null if none was specified.

getXmlType

public static XmlType getXmlType(com.sun.mirror.type.TypeMirror typeMirror)
                          throws XmlTypeException
Get the XML type for the specified type mirror.

Parameters:
typeMirror - The type mirror.
Returns:
The xml type for the specified type mirror.
Throws:
XmlTypeException - If the type is invalid or unknown as an xml type.

getXmlType

public static XmlType getXmlType(java.lang.Class type)
                          throws XmlTypeException
Get the XML type for the specified type.

Parameters:
type - The type mirror.
Returns:
The xml type for the specified type mirror.
Throws:
XmlTypeException - If the type is invalid or unknown as an xml type.