@ThreadSafe @Singleton public final class JAXBContextCache extends com.helger.commons.cache.Cache<JAXBContextCacheKey,JAXBContext>
| Modifier and Type | Method and Description |
|---|---|
JAXBContext |
getFromCache(Class<?> aClass)
Get the
JAXBContext from an existing Class object. |
JAXBContext |
getFromCache(Class<?> aClass,
ClassLoader aClassLoader)
Get the
JAXBContext from an existing Class object. |
JAXBContext |
getFromCache(Package aPackage)
Special overload with package and default
ClassLoader. |
JAXBContext |
getFromCache(Package aPackage,
ClassLoader aClassLoader)
Special overload with package and
ClassLoader. |
static JAXBContextCache |
getInstance() |
static boolean |
isInstantiated() |
com.helger.commons.state.EChange |
removeFromCache(Package aPackage) |
clearCache, createCache, getFromCache, getFromCacheNoStats, getFromCacheNoStatsNotLocked, getMaxSize, getName, hasMaxSize, isEmpty, isNotEmpty, putInCache, putInCacheNotLocked, removeFromCache, size, toStringpublic static boolean isInstantiated()
@Nonnull public static JAXBContextCache getInstance()
@Nullable public JAXBContext getFromCache(@Nonnull Package aPackage)
ClassLoader.aPackage - Package to load. May not be null.null if package is null.@Nullable public JAXBContext getFromCache(@Nonnull Package aPackage, @Nullable ClassLoader aClassLoader)
ClassLoader. In this case the
resulting value is NOT cached!aPackage - Package to load. May not be null.aClassLoader - Class loader to use. May be null in which case the
default class loader is used.null if package is null.@Nullable public JAXBContext getFromCache(@Nonnull Class<?> aClass)
JAXBContext from an existing Class object. If the
class's owning package is a valid JAXB package, this method redirects to
getFromCache(Package) otherwise a new JAXB context is created and
NOT cached.aClass - The class for which the JAXB context is to be created. May not be
null.null.@Nullable public JAXBContext getFromCache(@Nonnull Class<?> aClass, @Nullable ClassLoader aClassLoader)
JAXBContext from an existing Class object. If the
class's owning package is a valid JAXB package, this method redirects to
getFromCache(Package) otherwise a new JAXB context is created and
NOT cached.aClass - The class for which the JAXB context is to be created. May not be
null.aClassLoader - Class loader to use. May be null in which case the
default class loader is used.null.Copyright © 2015–2018 Philip Helger. All rights reserved.