Package org.jboss.resteasy.plugins.providers.jaxb

## Class JAXBContextWrapper

- java.lang.Object
- - javax.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 javax.xml.bind.JAXBContext

      `JAXB_CONTEXT_FACTORY`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `JAXBContextWrapper​(Class<?>[] classes, Map<String,​Object> properties, JAXBConfig config)` | Create a new JAXBContextWrapper.
    `JAXBContextWrapper​(String contextPath, JAXBConfig config)` | Create a new JAXBContextWrapper.
    `JAXBContextWrapper​(JAXBContext wrappedContext, JAXBConfig config)` |
    `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()` |
    `<T> Binder<T>` | `createBinder​(Class<T> domType)` |
    `JAXBIntrospector` | `createJAXBIntrospector()` |
    `Marshaller` | `createMarshaller()` |
    `Unmarshaller` | `createUnmarshaller()` |
    `Validator` | `createValidator()` | Deprecated. See javax.xml.bind.JAXBContext#createValidator().
    `void` | `generateSchema​(SchemaOutputResolver outputResolver)` |
    `Schema` | `getSchema()` | Get the schema.
    `void` | `setSchema​(Schema schema)` | Set the schema.

    - ### Methods inherited from class javax.xml.bind.JAXBContext

      `newInstance, newInstance, newInstance, newInstance, newInstance`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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` - classes
        `properties` - properties map
        `config` - jaxb configuration
      Throws:
        `JAXBException` - jaxb exception

    - #### JAXBContextWrapper

          public JAXBContextWrapper​(String contextPath,
                                    JAXBConfig config)
                             throws JAXBException

      Create a new JAXBContextWrapper.
      Parameters:
        `contextPath` - context path
        `config` - jaxb config
      Throws:
        `JAXBException` - jaxb exception

    - #### JAXBContextWrapper

          public JAXBContextWrapper​(JAXBConfig config,
                                    Class<?>... classes)
                             throws JAXBException

      Create a new JAXBContextWrapper.
      Parameters:
        `classes` - classes
        `config` - 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()

      Overrides:
        `createBinder` in class `JAXBContext`
      Returns:
        `Binder`
      See Also:
        `JAXBContext.createBinder()`

    - #### createBinder

          public <T> Binder<T> createBinder​(Class<T> domType)

      Overrides:
        `createBinder` in class `JAXBContext`
      Type Parameters:
        `T` - type
      Parameters:
        `domType` - dom class
      Returns:
        `Binder`
      See Also:
        `JAXBContext.createBinder(java.lang.Class)`

    - #### createJAXBIntrospector

          public JAXBIntrospector createJAXBIntrospector()

      Overrides:
        `createJAXBIntrospector` in class `JAXBContext`
      Returns:
        `JAXBIntrospector`
      See Also:
        `JAXBContext.createJAXBIntrospector()`

    - #### createMarshaller

          public Marshaller createMarshaller()
                                      throws JAXBException

      Specified by:
        `createMarshaller` in class `JAXBContext`
      Returns:
        jaxb marshaller
      Throws:
        `JAXBException` - jaxb exception
      See Also:
        `JAXBContext.createMarshaller()`

    - #### createUnmarshaller

          public Unmarshaller createUnmarshaller()
                                          throws JAXBException

      Specified by:
        `createUnmarshaller` in class `JAXBContext`
      Returns:
        jaxb unmarshaller
      Throws:
        `JAXBException` - jaxb exception
      See Also:
        `JAXBContext.createUnmarshaller()`

    - #### createValidator

          public Validator createValidator()
                                    throws JAXBException

      Deprecated.
      See javax.xml.bind.JAXBContext#createValidator().
      Specified by:
        `createValidator` in class `JAXBContext`
      Returns:
        xml validator
      Throws:
        `JAXBException` - jaxb exception
      See Also:
        `JAXBContext.createValidator()`

    - #### generateSchema

          public void generateSchema​(SchemaOutputResolver outputResolver)
                              throws IOException

      Overrides:
        `generateSchema` in class `JAXBContext`
      Parameters:
        `outputResolver` - xml schema resolver
      Throws:
        `IOException` - if I/O error occurred
      See Also:
        `JAXBContext.generateSchema(javax.xml.bind.SchemaOutputResolver)`