public class DynamicJAXBContext extends JAXBContext
A specialized JAXBContext for marshalling and unmarshalling DynamicEntities.
DynamicJAXBContext also provides methods to:
New instances of DynamicJAXBContext must be created with DynamicJAXBContextFactory.
JAXBContext
,
DynamicJAXBContextFactory
,
DynamicEntity
,
DynamicType
JAXB_CONTEXT_FACTORY
Modifier and Type | Method and Description |
---|---|
DynamicClassLoader |
getDynamicClassLoader() |
DynamicType |
getDynamicType(String javaName)
Obtain a reference to the DynamicType object for a given Java name.
|
Object |
getEnumConstant(String enumName,
String constantName)
Returns the constant named constantName from the enum class specified by enumName.
|
DynamicEntity |
newDynamicEntity(DynamicType dynamicType)
Create a new instance of DynamicEntity for a given DynamicType.
|
DynamicEntity |
newDynamicEntity(String javaName)
Create a new instance of DynamicEntity for a given Java name.
|
void |
refreshMetadata()
ADVANCED:
|
applyORMMetadata, createBinder, createBinder, createByQualifiedName, createByXPath, createJAXBIntrospector, createMarshaller, createUnmarshaller, createValidator, generateSchema, generateSchema, getArrayClassesToGeneratedClasses, getClassToGeneratedClasses, getCollectionClassesToGeneratedClasses, getQNamesToDeclaredClasses, getTypeMappingInfoToSchemaType, getTypeToSchemaType, getValueByXPath, getXMLContext, hasSwaRef, initTypeToSchemaType, setClassToGeneratedClasses, setQNamesToDeclaredClasses, setQNameToGeneratedClasses, setValueByXPath, setXMLContext
newInstance, newInstance, newInstance, newInstance, newInstance
public DynamicClassLoader getDynamicClassLoader()
public DynamicType getDynamicType(String javaName)
javaName
- A Java class name, used to look up its DynamicType.public DynamicEntity newDynamicEntity(String javaName) throws IllegalArgumentException
javaName
- The Java class name to create a new DynamicEntity for.IllegalArgumentException
public DynamicEntity newDynamicEntity(DynamicType dynamicType)
dynamicType
- The DynamicType to create a new DynamicEntity for.public Object getEnumConstant(String enumName, String constantName) throws ClassNotFoundException, JAXBException
enumName
- Java class name of an enum.constantName
- Name of the constant to get from the specified enum.ClassNotFoundException
JAXBException
public void refreshMetadata() throws JAXBException
JAXBContext
Refresh the underlying metadata based on the inputs that were used to create the JAXBContext. This is particularly useful when using the virtual property mappings. The refreshMetadata call could be made in the following way:
org.eclipse.persistence.jaxb.JAXBHelper.getJAXBContext(aJAXBContext).refreshMetadata();Note:
refreshMetadata
in class JAXBContext
JAXBException
EclipseLink 2.3.2, "build v20111125-r10461" API Reference