public static class DynamicType.Default extends Object implements DynamicType
Modifier and Type | Class and Description |
---|---|
protected static class |
DynamicType.Default.Loaded<T>
A default implementation of a loaded dynamic type.
|
static class |
DynamicType.Default.Unloaded<T>
A default implementation of an unloaded dynamic type.
|
DynamicType.Builder<T>, DynamicType.Default
Modifier and Type | Field and Description |
---|---|
protected List<? extends DynamicType> |
auxiliaryTypes
A list of auxiliary types for this dynamic type.
|
protected byte[] |
binaryRepresentation
The byte array representing this dynamic type.
|
protected TypeDescription |
typeDescription
A type description of this dynamic type.
|
protected TypeInitializer |
typeInitializer |
Constructor and Description |
---|
Default(TypeDescription typeDescription,
byte[] binaryRepresentation,
TypeInitializer typeInitializer,
List<? extends DynamicType> auxiliaryTypes)
Creates a new dynamic type.
|
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.
|
String |
toString() |
protected final TypeDescription typeDescription
protected final byte[] binaryRepresentation
protected final TypeInitializer typeInitializer
protected final List<? extends DynamicType> auxiliaryTypes
public Default(TypeDescription typeDescription, byte[] binaryRepresentation, TypeInitializer typeInitializer, List<? extends DynamicType> auxiliaryTypes)
typeDescription
- A description of this dynamic type.binaryRepresentation
- A byte array containing the binary representation of this dynamic type.typeInitializer
- The type initializer of this dynamic type.auxiliaryTypes
- The auxiliary type required for this dynamic type.public TypeDescription getDescription()
DynamicType
getDescription
in interface DynamicType
public Map<TypeDescription,TypeInitializer> getTypeInitializers()
DynamicType
getTypeInitializers
in interface DynamicType
public boolean hasAliveTypeInitializers()
DynamicType
hasAliveTypeInitializers
in interface DynamicType
true
if this type requires explicit type initialization.public byte[] getBytes()
DynamicType
getBytes
in interface DynamicType
public Map<TypeDescription,byte[]> getRawAuxiliaryTypes()
DynamicType
getRawAuxiliaryTypes
in interface DynamicType
public Map<TypeDescription,File> saveIn(File folder) throws IOException
DynamicType
saveIn
in interface DynamicType
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.