com.legstar.coxb.util
Class JAXBElementDescriptor
java.lang.Object
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.
JAXBElementDescriptor
public JAXBElementDescriptor(String jaxbPackageName,
String jaxbTypeName)
throws JAXBAnnotationException
- Create the element descriptor.
- Parameters:
jaxbPackageName
- the JAXB package namejaxbTypeName
- the JAXB type name
- Throws:
JAXBAnnotationException
- if JAXB annotations are incomplete
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.