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.
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| protected Map | classWriters
Map of |
| public DynamicClassWriter | defaultWriter
Default writer to use if one is not specified. |
| protected Map |
| Access | Constructor and Description |
|---|---|
| public | DynamicClassLoader(ClassLoader delegate)
Create a DynamicClassLoader providing the delegate loader and leaving the
defaultWriter as |
| public | DynamicClassLoader(ClassLoader delegate, DynamicClassWriter writer)
Create a DynamicClassLoader providing the delegate loader and a default
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addClass(String className)
Register a class to be dynamically created using the default
|
| public void | addClass(String className, Class<?> parentClass)
Register a class to be dynamically created using a copy of default
|
| public void | addClass(String className, EclipseLinkClassWriter writer)
Register a class to be dynamically created using the provided
|
| public void | |
| protected Class | |
| public void | |
| public Class | createDynamicClass(String className, DynamicClassWriter writer)
Create a dynamic class registering a writer and then forcing the provided class name to be loaded. |
| public Class | createDynamicClass(String className)
Create a new dynamic entity type for the specified name assuming the use of the default writer and its default parent class. |
| public Class | createDynamicClass(String className, Class<?> parentClass)
Create a new dynamic entity type for the specified name with the specified parent class. |
| public void | |
| public void | |
| protected Class | defineDynamicClass(String name, byte[] b)
Converts an array of bytes into an instance of class |
| protected Class | findClass(String
The binary name of the class className)Overrides java. |
| public EclipseLinkClassWriter | |
| protected Map | |
| public DynamicClassWriter | |
| public static DynamicClassLoader |
| classWriters | back to summary |
|---|---|
| protected Map<String, EclipseLinkClassWriter> classWriters Map of The map of writers is maintained for the life of this DynamicClassLoader instance to ensure additional requests to create dynamic classes of the same name are properly verified. Duplicate requests for dynamic classes of the same name, same writer type, and the same parent class are permitted but different parent classes or different writer types are not. | |
| defaultWriter | back to summary |
|---|---|
| public DynamicClassWriter defaultWriter Default writer to use if one is not specified. | |
| enumInfoRegistry | back to summary |
|---|---|
| protected Map<String, DynamicClassLoader. | |
| DynamicClassLoader | back to summary |
|---|---|
| public DynamicClassLoader(ClassLoader delegate) Create a DynamicClassLoader providing the delegate loader and leaving the
defaultWriter as | |
| DynamicClassLoader | back to summary |
|---|---|
| public DynamicClassLoader(ClassLoader delegate, DynamicClassWriter writer) Create a DynamicClassLoader providing the delegate loader and a default
| |
| addClass | back to summary |
|---|---|
| public void addClass(String className) Register a class to be dynamically created using the default
| |
| addClass | back to summary |
|---|---|
| public void addClass(String className, Class<?> parentClass) Register a class to be dynamically created using a copy of default
| |
| addClass | back to summary |
|---|---|
| public void addClass(String className, EclipseLinkClassWriter writer) throws DynamicException Register a class to be dynamically created using the provided
If a duplicate request is made for the same className and the writers are
not compatible a
| |
| addEnum | back to summary |
|---|---|
| public void addEnum(String className, Object... literalLabels) | |
| checkAssignable | back to summary |
|---|---|
| protected Class | |
| createDynamicAdapter | back to summary |
|---|---|
| public void createDynamicAdapter(String className) Create an adapter for given | |
| createDynamicClass | back to summary |
|---|---|
| public Class Create a dynamic class registering a writer and then forcing the provided class name to be loaded. | |
| createDynamicClass | back to summary |
|---|---|
| public Class Create a new dynamic entity type for the specified name assuming the use of the default writer and its default parent class. | |
| createDynamicClass | back to summary |
|---|---|
| public Class Create a new dynamic entity type for the specified name with the specified parent class. | |
| createDynamicCollectionAdapter | back to summary |
|---|---|
| public void createDynamicCollectionAdapter(String className) Create a collection adapter for given | |
| createDynamicReferenceAdapter | back to summary |
|---|---|
| public void createDynamicReferenceAdapter(String className) Create a reference for given | |
| defineDynamicClass | back to summary |
|---|---|
| protected Class Converts an array of bytes into an instance of class | |
| findClass | back to summary |
|---|---|
| protected Class Overrides java. Create a new dynamic class if a ClassWriter is registered for the provided className. This code is single threaded to ensure only one class is created for a given name and that the ClassWriter is removed afterwards.
| |
| getClassWriter | back to summary |
|---|---|
| public EclipseLinkClassWriter getClassWriter(String className) | |
| getClassWriters | back to summary |
|---|---|
| protected Map | |
| getDefaultWriter | back to summary |
|---|---|
| public DynamicClassWriter getDefaultWriter() | |
| lookup | back to summary |
|---|---|
| public static DynamicClassLoader lookup(Session session) Lookup the DynamicConversionManager for the given session. If the existing ConversionManager is not an instance of DynamicConversionManager then create a new one and replace the existing one. | |
| className | back to summary |
|---|---|
| pack-priv String className | |
| literalLabels | back to summary |
|---|---|
| pack-priv List<String> literalLabels | |
| EnumInfo | back to summary |
|---|---|
| public EnumInfo(String className) | |
| addLiteralLabel | back to summary |
|---|---|
| public void addLiteralLabel(String literalLabel) | |
| getClassName | back to summary |
|---|---|
| public String getClassName() | |
| getLiteralLabels | back to summary |
|---|---|
| public String[] getLiteralLabels() | |