com.legstar.coxb.util
Class JAXBElementDescriptor

java.lang.Object
  extended by com.legstar.coxb.util.JAXBElementDescriptor

public class JAXBElementDescriptor
extends Object

This immutable class holds the parameters that describe the relationship between an XML element and a corresponding JAXB object. This same information can be derived from a JAXB object XmlType annotation or XmlRootElement annotation.


Constructor Summary
JAXBElementDescriptor(String jaxbPackageName, String jaxbTypeName)
          Create the element descriptor.
 
Method Summary
 String getElementName()
           
 Class<?> getJaxbClass()
           
 String getJaxbPackageName()
           
 String getJaxbTypeName()
           
 String getNamespace()
           
 Object getObjectFactory()
          Returns the JAXB package Object factory.
 boolean isXmlRootElement()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JAXBElementDescriptor

public JAXBElementDescriptor(String jaxbPackageName,
                             String jaxbTypeName)
                      throws JAXBAnnotationException
Create the element descriptor.

Parameters:
jaxbPackageName - the JAXB package name
jaxbTypeName - the JAXB type name
Throws:
JAXBAnnotationException - if JAXB annotations are incomplete
Method Detail

getJaxbPackageName

public String getJaxbPackageName()
Returns:
the JAXB package name

getJaxbTypeName

public String getJaxbTypeName()
Returns:
the JAXB class name

getElementName

public String getElementName()
Returns:
the element name is given either by the XmlRootElement annotation or the XmlType annotation. from JAXB annotations

isXmlRootElement

public boolean isXmlRootElement()
Returns:
true if the JAXB element is marked as XmlRootElement which means it does not need to be encapsulated in a JAXBElement.

getObjectFactory

public Object getObjectFactory()
Returns the JAXB package Object factory.

Returns:
the object factory

toString

public String toString()

Overrides:
toString in class Object

getNamespace

public String getNamespace()
Returns:
the XML Schema namespace

getJaxbClass

public Class<?> getJaxbClass()
Returns:
the The JAXB class


Copyright © 2015 LegSem. All Rights Reserved.