Package com.helger.jaxb
Class JAXBContextCacheKey
java.lang.Object
com.helger.jaxb.JAXBContextCacheKey
The key class for the
JAXBContextCache- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionJAXBContextCacheKey(com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses, Map<String, ?> aProperties) Cache key using package and optional class loaderJAXBContextCacheKey(com.helger.commons.collection.impl.ICommonsList<Package> aPackages, ClassLoader aClassLoader) Cache key using package and optional class loaderJAXBContextCacheKey(Package aPackage, ClassLoader aClassLoader) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic JAXBContextCacheKeycreateForClass(Class<?> aClass) Get theJAXBContextfrom an existingClassobject.static JAXBContextCacheKeycreateForClass(Class<?> aClass, ClassLoader aClassLoader) Get theJAXBContextfrom an existingClassobject.static JAXBContextCacheKeycreateForClasses(com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses) Get theJAXBContextfrom existingClassobjects.static JAXBContextCacheKeycreateForClasses(com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses, Map<String, ?> aProperties) Get theJAXBContextfrom existingClassobjects and optional JAXB Context properties.static JAXBContextCacheKeycreateForClasses(Class<?>... aClasses) Get theJAXBContextfrom existingClassobjects.static JAXBContextCacheKeycreateForPackage(Package aPackage) Factory method with a single package and the defaultClassLoader.static JAXBContextCacheKeycreateForPackage(Package aPackage, ClassLoader aClassLoader) Factory method with a single package and the providedClassLoader.static JAXBContextCacheKeycreateForPackages(com.helger.commons.collection.impl.ICommonsList<Package> aPackages) Factory method with a list of packages and the defaultClassLoader.static JAXBContextCacheKeycreateForPackages(com.helger.commons.collection.impl.ICommonsList<Package> aPackages, ClassLoader aClassLoader) Factory method with a list of packages and the providedClassLoader.static JAXBContextCacheKeycreateForPackages(Package... aPackages) Factory method with a list of packages and the defaultClassLoader.jakarta.xml.bind.JAXBContextcreateJAXBContext(com.helger.commons.log.ConditionalLogger aCondLog) booleaninthashCode()toString()
-
Constructor Details
-
JAXBContextCacheKey
@Deprecated(forRemoval=true, since="11.0.4") public JAXBContextCacheKey(@Nonnull Package aPackage, @Nullable ClassLoader aClassLoader) Deprecated, for removal: This API element is subject to removal in a future version.Cache key using package and optional class loader- Parameters:
aPackage- Package to be used. May not benull.aClassLoader- Class loader. May benull.
-
JAXBContextCacheKey
public JAXBContextCacheKey(@Nonnull com.helger.commons.collection.impl.ICommonsList<Package> aPackages, @Nullable ClassLoader aClassLoader) Cache key using package and optional class loader- Parameters:
aPackages- Packages to be used. May not benull.aClassLoader- Class loader. May benull.- Since:
- 11.0.4
-
JAXBContextCacheKey
public JAXBContextCacheKey(@Nonnull com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses, @Nullable Map<String, ?> aProperties) Cache key using package and optional class loader- Parameters:
aClasses- Classes to be used. May not benull.aProperties- JAXB context properties. May benull.- Since:
- v9.4.2
-
-
Method Details
-
createJAXBContext
-
equals
-
hashCode
public int hashCode() -
toString
-
createForPackage
Factory method with a single package and the defaultClassLoader.- Parameters:
aPackage- Package to load. May not benull.- Returns:
- The created object. Never
null. - Since:
- 11.0.4
-
createForPackage
@Nonnull public static JAXBContextCacheKey createForPackage(@Nonnull Package aPackage, @Nullable ClassLoader aClassLoader) Factory method with a single package and the providedClassLoader.- Parameters:
aPackage- Package to load. May not benull.aClassLoader- Class loader. May benull.- Returns:
- The created object. Never
null. - Since:
- 11.0.4
-
createForPackages
@Nonnull public static JAXBContextCacheKey createForPackages(@Nonnull com.helger.commons.collection.impl.ICommonsList<Package> aPackages) Factory method with a list of packages and the defaultClassLoader.- Parameters:
aPackages- List of packages to load. May not benull.- Returns:
- The created object. Never
null. - Since:
- 11.0.4
-
createForPackages
Factory method with a list of packages and the defaultClassLoader.- Parameters:
aPackages- List of packages to load. May not benull.- Returns:
- The created object. Never
null. - Since:
- 11.0.4
-
createForPackages
@Nonnull public static JAXBContextCacheKey createForPackages(@Nonnull com.helger.commons.collection.impl.ICommonsList<Package> aPackages, @Nullable ClassLoader aClassLoader) Factory method with a list of packages and the providedClassLoader.- Parameters:
aPackages- List of packages to load. May not benull.aClassLoader- Class loader. May benull.- Returns:
- The created object. Never
null. - Since:
- 11.0.4
-
createForClass
Get theJAXBContextfrom an existingClassobject. If the class's owning package is a valid JAXB package, this method redirects tocreateForPackage(Package)- Parameters:
aClass- The class for which the JAXB context is to be created. May not benull.- Returns:
- The created object. Never
null. - Since:
- 11.0.4
-
createForClass
@Nonnull public static JAXBContextCacheKey createForClass(@Nonnull Class<?> aClass, @Nullable ClassLoader aClassLoader) Get theJAXBContextfrom an existingClassobject. If the class's owning package is a valid JAXB package, this method redirects tocreateForPackage(Package, ClassLoader)- Parameters:
aClass- The class for which the JAXB context is to be created. May not benull.aClassLoader- Class loader to use. May benullin which case the default class loader is used.- Returns:
- The created object. Never
null. - Since:
- 11.0.4
-
createForClasses
@Nonnull public static JAXBContextCacheKey createForClasses(@Nonnull com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses) Get theJAXBContextfrom existingClassobjects.- Parameters:
aClasses- The classes for which the JAXB context is to be created. May not benullnor empty.- Returns:
- The created object. Never
null. - Since:
- 11.0.4
-
createForClasses
Get theJAXBContextfrom existingClassobjects.- Parameters:
aClasses- The classes for which the JAXB context is to be created. May not benullnor empty.- Returns:
- The created object. Never
null. - Since:
- 11.0.4
-
createForClasses
@Nonnull public static JAXBContextCacheKey createForClasses(@Nonnull com.helger.commons.collection.impl.ICommonsList<Class<?>> aClasses, @Nullable Map<String, ?> aProperties) Get theJAXBContextfrom existingClassobjects and optional JAXB Context properties.- Parameters:
aClasses- The classes for which the JAXB context is to be created. May not benullnor empty.aProperties- JAXB context properties. May benull.- Returns:
- The created object. Never
null. - Since:
- 11.0.4
-