public interface DynamicType
DynamicType.Builder
or as the result of an
AuxiliaryType
.
Note that the
TypeDescription
s will represent their
unloaded forms and therefore differ from the loaded types, especially with regards to annotations.Modifier and Type | Interface and Description |
---|---|
static interface |
DynamicType.Builder<T>
A builder for defining a dynamic type.
|
static class |
DynamicType.Default
A default implementation of a dynamic type.
|
static interface |
DynamicType.Loaded<T>
A dynamic type that has been loaded into the running instance of the Java virtual machine.
|
static interface |
DynamicType.Unloaded<T>
A dynamic type that has not yet been loaded by a given
ClassLoader . |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Returns a byte array representing this dynamic type.
|
TypeDescription |
getDescription()
Returns a description of this dynamic type.
|
Map<TypeDescription,byte[]> |
getRawAuxiliaryTypes()
Returns a map of all auxiliary types that are required for making use of the main type.
|
Map<TypeDescription,TypeInitializer> |
getTypeInitializers()
Returns a map of all type initializers for the main type and all auxiliary types, if any.
|
boolean |
hasAliveTypeInitializers()
Checks if a dynamic type requires some form of explicit type initialization, either for itself or for one
of its auxiliary types, if any.
|
Map<TypeDescription,File> |
saveIn(File folder)
Saves a dynamic type in a given folder using the Java class file format while respecting the naming conventions
for saving compiled Java classes.
|
TypeDescription getDescription()
byte[] getBytes()
Map<TypeDescription,byte[]> getRawAuxiliaryTypes()
Map<TypeDescription,TypeInitializer> getTypeInitializers()
boolean hasAliveTypeInitializers()
true
if this type requires explicit type initialization.Map<TypeDescription,File> saveIn(File folder) throws IOException
folder
- The base target folder for storing this dynamic type and its auxiliary types, if any.folder
.IOException
- Thrown if the underlying file operations cause an IOException
.Copyright © 2014. All rights reserved.