Module org.eclipse.persistence.moxy
Class DynamicJAXBContext
java.lang.Object
jakarta.xml.bind.JAXBContext
org.eclipse.persistence.jaxb.JAXBContext
org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext
A specialized JAXBContext for marshalling and unmarshalling DynamicEntities.
DynamicJAXBContext also provides methods to:
- get the
DynamicTypeassociated with a given Java name - get the
DynamicTypeassociated with a given XML name - create a new
DynamicEntitygiven the Java name of itsDynamicType - create a new
DynamicEntitygiven the XML name of itsDynamicType
New instances of DynamicJAXBContext must be created with DynamicJAXBContextFactory.
- Since:
- EclipseLink 2.1
- See Also:
-
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_HANDLERFields inherited from class jakarta.xml.bind.JAXBContext
JAXB_CONTEXT_FACTORY -
Method Summary
Modifier and TypeMethodDescriptiongetDynamicType(String javaName) Obtain a reference to theDynamicTypeobject for a given Java name.getEnumConstant(String enumName, String constantName) Returns the constant namedconstantNamefrom the enum class specified byenumName.newDynamicEntity(String javaName) Create a new instance ofDynamicEntityfor a given Java name.newDynamicEntity(DynamicType dynamicType) Create a new instance ofDynamicEntityfor a givenDynamicType.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, setXMLContextMethods inherited from class jakarta.xml.bind.JAXBContext
newInstance, newInstance, newInstance, newInstance, newInstance
-
Method Details
-
getDynamicClassLoader
-
getDynamicType
Obtain a reference to theDynamicTypeobject for a given Java name. If one has not been generated, this method will returnnull.- Parameters:
javaName- A Java class name, used to look up itsDynamicType.- Returns:
- The
DynamicTypefor this Java class name.
-
newDynamicEntity
Create a new instance ofDynamicEntityfor a given Java name. If aDynamicTypefor this Java class name has not been generated, this method will returnnull.- Parameters:
javaName- The Java class name to create a newDynamicEntityfor.- Returns:
- A new
DynamicEntityfor this Java class name. - Throws:
IllegalArgumentException
-
newDynamicEntity
Create a new instance ofDynamicEntityfor a givenDynamicType.- Parameters:
dynamicType- TheDynamicTypeto create a newDynamicEntityfor.- Returns:
- A new
DynamicEntityfor thisDynamicType.
-
getEnumConstant
public Object getEnumConstant(String enumName, String constantName) throws ClassNotFoundException, JAXBException Returns the constant namedconstantNamefrom the enum class specified byenumName.- 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:
ClassNotFoundExceptionJAXBException
-