Package org.eclipse.persistence.jpa.rs
Class DynamicRestClassLoader
java.lang.Object
java.lang.ClassLoader
org.eclipse.persistence.dynamic.DynamicClassLoader
org.eclipse.persistence.jpa.rs.DynamicRestClassLoader
This custom ClassLoader provides support for dynamically generating classes
within an JPA-RS EclipseLink application using byte codes created using a
DynamicClassWriter
. A DynamicClassLoader requires a parent or
delegate class-loader which is provided to the constructor. This delegate
class loader handles the lookup and storage of all created classes.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.persistence.dynamic.DynamicClassLoader
DynamicClassLoader.EnumInfo
-
Field Summary
Fields inherited from class org.eclipse.persistence.dynamic.DynamicClassLoader
classWriters, defaultWriter, enumInfoRegistry
-
Constructor Summary
ConstructorDescriptionDynamicRestClassLoader
(ClassLoader delegate) DynamicRestClassLoader
(ClassLoader delegate, DynamicClassWriter writer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
createDynamicAdapter
(String className) Create an adapter for givenclassName
Class<?>
createDynamicClass
(String className, DynamicClassWriter writer) Create a dynamic class registering a writer and then forcing the provided class name to be loaded.void
createDynamicCollectionAdapter
(String className) Create a collection adapter for givenclassName
void
createDynamicReferenceAdapter
(String className) Create a reference for givenclassName
Methods inherited from class org.eclipse.persistence.dynamic.DynamicClassLoader
addClass, addClass, addClass, addEnum, checkAssignable, createDynamicClass, createDynamicClass, defineDynamicClass, findClass, getClassWriter, getClassWriters, getDefaultWriter, lookup
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
DynamicRestClassLoader
-
DynamicRestClassLoader
-
-
Method Details
-
createDynamicAdapter
Description copied from class:DynamicClassLoader
Create an adapter for givenclassName
- Overrides:
createDynamicAdapter
in classDynamicClassLoader
-
createDynamicCollectionAdapter
Description copied from class:DynamicClassLoader
Create a collection adapter for givenclassName
- Overrides:
createDynamicCollectionAdapter
in classDynamicClassLoader
-
createDynamicReferenceAdapter
Description copied from class:DynamicClassLoader
Create a reference for givenclassName
- Overrides:
createDynamicReferenceAdapter
in classDynamicClassLoader
-
createDynamicClass
Description copied from class:DynamicClassLoader
Create a dynamic class registering a writer and then forcing the provided class name to be loaded.- Overrides:
createDynamicClass
in classDynamicClassLoader
-