T
- The most specific known loaded type that is implemented by this dynamic type, usually the
type itself, an interface or the direct super class.@HashCodeAndEqualsPlugin.Enhance public static class DynamicType.Default.Unloaded<T> extends DynamicType.Default implements DynamicType.Unloaded<T>
DynamicType.Default.Dispatcher, DynamicType.Default.Loaded<T>, DynamicType.Default.Unloaded<T>
DynamicType.Builder<T>, DynamicType.Default, DynamicType.Loaded<T>, DynamicType.Unloaded<T>
Modifier and Type | Field and Description |
---|---|
private TypeResolutionStrategy.Resolved |
typeResolutionStrategy
The type resolution strategy to use for initializing the dynamic type.
|
auxiliaryTypes, binaryRepresentation, DISPATCHER, loadedTypeInitializer, typeDescription
Constructor and Description |
---|
Unloaded(TypeDescription typeDescription,
byte[] binaryRepresentation,
LoadedTypeInitializer loadedTypeInitializer,
java.util.List<? extends DynamicType> auxiliaryTypes,
TypeResolutionStrategy.Resolved typeResolutionStrategy)
Creates a new unloaded representation of a dynamic type.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Unloaded<T> |
include(DynamicType... dynamicType)
Includes the provided dynamic types as auxiliary types of this instance.
|
DynamicType.Unloaded<T> |
include(java.util.List<? extends DynamicType> dynamicType)
Includes the provided dynamic types as auxiliary types of this instance.
|
DynamicType.Loaded<T> |
load(java.lang.ClassLoader classLoader)
Attempts to load this dynamic type including all of its auxiliary types, if any.
|
<S extends java.lang.ClassLoader> |
load(S classLoader,
ClassLoadingStrategy<? super S> classLoadingStrategy)
Attempts to load this dynamic type including all of its auxiliary types, if any.
|
getAllTypes, getAuxiliaryTypes, getBytes, getLoadedTypeInitializers, getTypeDescription, hasAliveLoadedTypeInitializers, inject, inject, saveIn, toJar, toJar
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAllTypes, getAuxiliaryTypes, getBytes, getLoadedTypeInitializers, getTypeDescription, hasAliveLoadedTypeInitializers, inject, inject, saveIn, toJar, toJar
private final TypeResolutionStrategy.Resolved typeResolutionStrategy
public Unloaded(TypeDescription typeDescription, byte[] binaryRepresentation, LoadedTypeInitializer loadedTypeInitializer, java.util.List<? extends DynamicType> auxiliaryTypes, TypeResolutionStrategy.Resolved typeResolutionStrategy)
typeDescription
- A description of this dynamic type.binaryRepresentation
- An array of byte of the binary representation of this dynamic type.loadedTypeInitializer
- The type initializer of this dynamic type.auxiliaryTypes
- The auxiliary types that are required for this dynamic type.typeResolutionStrategy
- The type resolution strategy to use for initializing the dynamic type.public DynamicType.Loaded<T> load(java.lang.ClassLoader classLoader)
InjectionClassLoader
, the classes are injected directy into the class loader, otherwise,
a new class loader is created where the supplied class loader is set as parent.load
in interface DynamicType.Unloaded<T>
classLoader
- The class loader to use for this class loading.public <S extends java.lang.ClassLoader> DynamicType.Loaded<T> load(S classLoader, ClassLoadingStrategy<? super S> classLoadingStrategy)
load
in interface DynamicType.Unloaded<T>
S
- The least specific type of class loader this strategy can apply to.classLoader
- The class loader to use for this class loading.classLoadingStrategy
- The class loader strategy which should be used for this class loading.ClassLoadingStrategy.Default
public DynamicType.Unloaded<T> include(DynamicType... dynamicType)
include
in interface DynamicType.Unloaded<T>
dynamicType
- The dynamic types to include.public DynamicType.Unloaded<T> include(java.util.List<? extends DynamicType> dynamicType)
include
in interface DynamicType.Unloaded<T>
dynamicType
- The dynamic types to include.