@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(com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses)
Get the
JAXBContext from existing Class objects. |
JAXBContext |
getFromCache(com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses,
Map<String,?> aProperties)
Get the
JAXBContext from existing Class objects and
optional JAXB Context properties. |
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() |
static boolean |
isSilentMode() |
com.helger.commons.state.EChange |
removeFromCache(com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses) |
com.helger.commons.state.EChange |
removeFromCache(com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses,
Map<String,?> aProperties) |
com.helger.commons.state.EChange |
removeFromCache(Package aPackage) |
com.helger.commons.state.EChange |
removeFromCache(Package aPackage,
ClassLoader aClassLoader) |
static boolean |
setSilentMode(boolean bSilentMode)
Enable or disable certain regular log messages.
|
clearCache, createCache, getCacheKeyProvider, getFromCache, getFromCacheNoStats, getFromCacheNoStatsNotLocked, getMaxSize, getName, getValueProvider, hasMaxSize, isAllowNullValues, isEmpty, isInCache, isNotEmpty, putInCache, putInCacheNotLocked, removeFromCache, size, toStringpublic static boolean isSilentMode()
true if logging is disabled, false if it
is enabled.public static boolean setSilentMode(boolean bSilentMode)
bSilentMode - true to disable logging, false to enable
loggingpublic 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).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.@Nullable public JAXBContext getFromCache(@Nonnull com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses)
JAXBContext from existing Class objects.aClasses - The classes for which the JAXB context is to be created. May not be
null nor empty.null.@Nullable public JAXBContext getFromCache(@Nonnull com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses, @Nullable Map<String,?> aProperties)
JAXBContext from existing Class objects and
optional JAXB Context properties.aClasses - The classes for which the JAXB context is to be created. May not be
null nor empty.aProperties - JAXB context properties. May be null.null.@Nonnull public com.helger.commons.state.EChange removeFromCache(@Nonnull Package aPackage)
@Nonnull public com.helger.commons.state.EChange removeFromCache(@Nonnull Package aPackage, @Nullable ClassLoader aClassLoader)
@Nonnull public com.helger.commons.state.EChange removeFromCache(@Nonnull com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses)
Copyright © 2015–2021 Philip Helger. All rights reserved.