Class JAXBContextWrapper
- java.lang.Object
-
- jakarta.xml.bind.JAXBContext
-
- org.jboss.resteasy.plugins.providers.jaxb.JAXBContextWrapper
-
public class JAXBContextWrapper extends JAXBContext
A wrapper class around a JAXBContext that enables additional features to the RESTEasy JAXB-based providers.- Version:
- $Revision:$
- Author:
- Ryan J. McDonough
-
-
Field Summary
-
Fields inherited from class jakarta.xml.bind.JAXBContext
JAXB_CONTEXT_FACTORY
-
-
Constructor Summary
Constructors Constructor Description JAXBContextWrapper(JAXBContext wrappedContext, JAXBConfig config)JAXBContextWrapper(Class<?>[] classes, Map<String,Object> properties, JAXBConfig config)Create a new JAXBContextWrapper.JAXBContextWrapper(String contextPath, JAXBConfig config)Create a new JAXBContextWrapper.JAXBContextWrapper(JAXBConfig config, Class<?>... classes)Create a new JAXBContextWrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Binder<Node>createBinder()Creates aBinderfor W3C DOM.<T> Binder<T>createBinder(Class<T> domType)Creates aBinderobject that can be used for associative/in-place unmarshalling/marshalling.JAXBIntrospectorcreateJAXBIntrospector()Creates aJAXBIntrospectorobject that can be used to introspect Jakarta XML Binding objects.MarshallercreateMarshaller()Create aMarshallerobject that can be used to convert a java content tree into XML data.UnmarshallercreateUnmarshaller()Create anUnmarshallerobject that can be used to convert XML data into a java content tree.ValidatorcreateValidator()Deprecated.See jakarta.xml.bind.JAXBContext#createValidator().voidgenerateSchema(SchemaOutputResolver outputResolver)Generates the schema documents for this context.SchemagetSchema()Get the schema.voidsetSchema(Schema schema)Set the schema.-
Methods inherited from class jakarta.xml.bind.JAXBContext
newInstance, newInstance, newInstance, newInstance, newInstance
-
-
-
-
Constructor Detail
-
JAXBContextWrapper
public JAXBContextWrapper(JAXBContext wrappedContext, JAXBConfig config) throws JAXBException
- Throws:
JAXBException
-
JAXBContextWrapper
public JAXBContextWrapper(Class<?>[] classes, Map<String,Object> properties, JAXBConfig config) throws JAXBException
Create a new JAXBContextWrapper.- Parameters:
classes- classesproperties- properties mapconfig- jaxb configuration- Throws:
JAXBException- jaxb exception
-
JAXBContextWrapper
public JAXBContextWrapper(String contextPath, JAXBConfig config) throws JAXBException
Create a new JAXBContextWrapper.- Parameters:
contextPath- context pathconfig- jaxb config- Throws:
JAXBException- jaxb exception
-
JAXBContextWrapper
public JAXBContextWrapper(JAXBConfig config, Class<?>... classes) throws JAXBException
Create a new JAXBContextWrapper.- Parameters:
classes- classesconfig- jaxb config- Throws:
JAXBException- jaxb exception
-
-
Method Detail
-
getSchema
public Schema getSchema()
Get the schema.- Returns:
- the schema.
-
setSchema
public void setSchema(Schema schema)
Set the schema.- Parameters:
schema- The schema to set.
-
createBinder
public Binder<Node> createBinder()
Description copied from class:JAXBContextCreates aBinderfor W3C DOM.- Overrides:
createBinderin classJAXBContext- Returns:
Binder- See Also:
JAXBContext.createBinder()
-
createBinder
public <T> Binder<T> createBinder(Class<T> domType)
Description copied from class:JAXBContextCreates aBinderobject that can be used for associative/in-place unmarshalling/marshalling.- Overrides:
createBinderin classJAXBContext- Type Parameters:
T- type- Parameters:
domType- dom class- Returns:
Binder- See Also:
JAXBContext.createBinder(java.lang.Class)
-
createJAXBIntrospector
public JAXBIntrospector createJAXBIntrospector()
Description copied from class:JAXBContextCreates aJAXBIntrospectorobject that can be used to introspect Jakarta XML Binding objects.- Overrides:
createJAXBIntrospectorin classJAXBContext- Returns:
JAXBIntrospector- See Also:
JAXBContext.createJAXBIntrospector()
-
createMarshaller
public Marshaller createMarshaller() throws JAXBException
Description copied from class:JAXBContextCreate aMarshallerobject that can be used to convert a java content tree into XML data.- Specified by:
createMarshallerin classJAXBContext- Returns:
- jaxb marshaller
- Throws:
JAXBException- jaxb exception- See Also:
JAXBContext.createMarshaller()
-
createUnmarshaller
public Unmarshaller createUnmarshaller() throws JAXBException
Description copied from class:JAXBContextCreate anUnmarshallerobject that can be used to convert XML data into a java content tree.- Specified by:
createUnmarshallerin classJAXBContext- Returns:
- jaxb unmarshaller
- Throws:
JAXBException- jaxb exception- See Also:
JAXBContext.createUnmarshaller()
-
createValidator
public Validator createValidator() throws JAXBException
Deprecated.See jakarta.xml.bind.JAXBContext#createValidator().Description copied from class:JAXBContextValidatorhas been made optional and deprecated in Jakarta XML Binding. Please refer to the javadoc forValidatorfor more detail.Create a
Validatorobject that can be used to validate a java content tree against its source schema.- Specified by:
createValidatorin classJAXBContext- Returns:
- xml validator
- Throws:
JAXBException- jaxb exception- See Also:
JAXBContext.createValidator()
-
generateSchema
public void generateSchema(SchemaOutputResolver outputResolver) throws IOException
Description copied from class:JAXBContextGenerates the schema documents for this context.- Overrides:
generateSchemain classJAXBContext- Parameters:
outputResolver- xml schema resolver- Throws:
IOException- if I/O error occurred- See Also:
JAXBContext.generateSchema(jakarta.xml.bind.SchemaOutputResolver)
-
-