JAXBContextCache (Apache CXF JavaDoc 4.2.2 API)
Description: declaration: package: org.apache.cxf.common.jaxb, class: JAXBContextCache

Package org.apache.cxf.common.jaxb

# Class JAXBContextCache

java.lang.Object
org.apache.cxf.common.jaxb.JAXBContextCache

public final class JAXBContextCache extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `JAXBContextCache.CachedContextAndSchemas`
  Return holder of the context, classes, etc...

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `addPackage(Set<Class<?>> classes, String pkg, ClassLoader loader)`
  `static void`
  `clearCaches()`
  Clear any caches to make sure new contexts are created
  `static JAXBContextCache.CachedContextAndSchemas`
  `getCachedContextAndSchemas(Class<?>... cls)`
  `static JAXBContextCache.CachedContextAndSchemas`
  `getCachedContextAndSchemas(String pkg, Map<String,Object> props, ClassLoader loader)`
  `static JAXBContextCache.CachedContextAndSchemas`
  `getCachedContextAndSchemas(Set<Class<?>> classes, String defaultNs, Map<String,Object> props, Collection<Object> typeRefs, boolean exact)`
  `static void`
  `scanPackages(Set<Class<?>> classes)`

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

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

- ## Method Details

  - ### clearCaches

    public static void clearCaches()
    Clear any caches to make sure new contexts are created

  - ### scanPackages

    public static void scanPackages(Set<Class<?>> classes)

  - ### getCachedContextAndSchemas

    public static JAXBContextCache.CachedContextAndSchemas getCachedContextAndSchemas(Class<?>... cls) throws jakarta.xml.bind.JAXBException
    Throws:
      `jakarta.xml.bind.JAXBException`

  - ### getCachedContextAndSchemas

    public static JAXBContextCache.CachedContextAndSchemas getCachedContextAndSchemas(String pkg, Map<String,Object> props, ClassLoader loader) throws jakarta.xml.bind.JAXBException
    Throws:
      `jakarta.xml.bind.JAXBException`

  - ### getCachedContextAndSchemas

    public static JAXBContextCache.CachedContextAndSchemas getCachedContextAndSchemas(Set<Class<?>> classes, String defaultNs, Map<String,Object> props, Collection<Object> typeRefs, boolean exact) throws jakarta.xml.bind.JAXBException
    Throws:
      `jakarta.xml.bind.JAXBException`

  - ### addPackage

    public static void addPackage(Set<Class<?>> classes, String pkg, ClassLoader loader)