Class DynamicJAXBContext
- java.lang.Object
-
- javax.xml.bind.JAXBContext
-
- org.eclipse.persistence.jaxb.JAXBContext
-
- org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext
-
public class DynamicJAXBContext extends JAXBContext
A specialized JAXBContext for marshalling and unmarshalling DynamicEntities.
DynamicJAXBContext also provides methods to:
- get the DynamicType associated with a given Java name
- get the DynamicType associated with a given XML name
- create a new DynamicEntity given the Java name of its DynamicType
- create a new DynamicEntity given the XML name of its DynamicType
New instances of DynamicJAXBContext must be created with DynamicJAXBContextFactory.
- See Also:
JAXBContext
,DynamicJAXBContextFactory
,DynamicEntity
,DynamicType
- Author:
- rbarkhouse
- Since:
- EclipseLink 2.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.jaxb.JAXBContext
JAXBContext.JAXBContextInput, JAXBContext.JAXBContextState
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.jaxb.JAXBContext
contextInput, contextState, DEFAULT_VALIDATION_EVENT_HANDLER
-
Fields inherited from class javax.xml.bind.JAXBContext
JAXB_CONTEXT_FACTORY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicClassLoader
getDynamicClassLoader()
DynamicType
getDynamicType(java.lang.String javaName)
Obtain a reference to the DynamicType object for a given Java name.java.lang.Object
getEnumConstant(java.lang.String enumName, java.lang.String constantName)
Returns the constant named constantName from the enum class specified by enumName.DynamicEntity
newDynamicEntity(java.lang.String javaName)
Create a new instance of DynamicEntity for a given Java name.DynamicEntity
newDynamicEntity(DynamicType dynamicType)
Create a new instance of DynamicEntity for a given DynamicType.-
Methods inherited from class org.eclipse.persistence.jaxb.JAXBContext
applyORMMetadata, createBinder, createBinder, createByQualifiedName, createByXPath, createJAXBElement, createJAXBElementFromXMLRoot, createJAXBIntrospector, createMarshaller, createObjectGraph, createObjectGraph, createUnmarshaller, createValidator, generateJsonSchema, generateSchema, generateSchema, getArrayClassesToGeneratedClasses, getBeanValidationHelper, getClassToGeneratedClasses, getCollectionClassesToGeneratedClasses, getQNamesToDeclaredClasses, getTypeMappingInfoToSchemaType, getTypeToSchemaType, getValueByXPath, getXMLContext, getXMLInputFactory, hasSwaRef, initTypeToSchemaType, refreshMetadata, setClassToGeneratedClasses, setQNamesToDeclaredClasses, setQNameToGeneratedClasses, setValueByXPath, setXMLContext
-
Methods inherited from class javax.xml.bind.JAXBContext
newInstance, newInstance, newInstance, newInstance, newInstance
-
-
-
-
Method Detail
-
getDynamicClassLoader
public DynamicClassLoader getDynamicClassLoader()
-
getDynamicType
public DynamicType getDynamicType(java.lang.String javaName)
Obtain a reference to the DynamicType object for a given Java name. If one has not been generated, this method will return null.- Parameters:
javaName
- A Java class name, used to look up its DynamicType.- Returns:
- The DynamicType for this Java class name.
-
newDynamicEntity
public DynamicEntity newDynamicEntity(java.lang.String javaName) throws java.lang.IllegalArgumentException
Create a new instance of DynamicEntity for a given Java name. If a DynamicType for this Java class name has not been generated, this method will return null.- Parameters:
javaName
- The Java class name to create a new DynamicEntity for.- Returns:
- A new DynamicEntity for this Java class name.
- Throws:
java.lang.IllegalArgumentException
-
newDynamicEntity
public DynamicEntity newDynamicEntity(DynamicType dynamicType)
Create a new instance of DynamicEntity for a given DynamicType.- Parameters:
dynamicType
- The DynamicType to create a new DynamicEntity for.- Returns:
- A new DynamicEntity for this DynamicType.
-
getEnumConstant
public java.lang.Object getEnumConstant(java.lang.String enumName, java.lang.String constantName) throws java.lang.ClassNotFoundException, JAXBException
Returns the constant named constantName from the enum class specified by enumName.- Parameters:
enumName
- Java class name of an enum.constantName
- Name of the constant to get from the specified enum.- Returns:
- An Object, the constant from the specified enum.
- Throws:
java.lang.ClassNotFoundException
JAXBException
-
-