Package net.bytebuddy.dynamic
Class DynamicType.Default.Unloaded<T>
- java.lang.Object
-
- net.bytebuddy.dynamic.DynamicType.Default
-
- net.bytebuddy.dynamic.DynamicType.Default.Unloaded<T>
-
- Type Parameters:
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.
- All Implemented Interfaces:
DynamicType,DynamicType.Unloaded<T>
- Enclosing class:
- DynamicType.Default
public static class DynamicType.Default.Unloaded<T> extends DynamicType.Default implements DynamicType.Unloaded<T>
A default implementation of an unloaded dynamic type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.dynamic.DynamicType.Default
DynamicType.Default.Loaded<T>, DynamicType.Default.Unloaded<T>
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType
DynamicType.Builder<T>, DynamicType.Default, DynamicType.Loaded<T>, DynamicType.Unloaded<T>
-
-
Field Summary
-
Fields inherited from class net.bytebuddy.dynamic.DynamicType.Default
auxiliaryTypes, binaryRepresentation, loadedTypeInitializer, typeDescription
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)inthashCode()DynamicType.Unloaded<T>include(java.util.List<? extends DynamicType> dynamicType)Includes the provided dynamic types as auxiliary types of this instance.DynamicType.Unloaded<T>include(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>
DynamicType.Loaded<T>load(S classLoader, ClassLoadingStrategy<? super S> classLoadingStrategy)Attempts to load this dynamic type including all of its auxiliary types, if any.-
Methods inherited from class net.bytebuddy.dynamic.DynamicType.Default
getAllTypes, getAuxiliaryTypes, getBytes, getLoadedTypeInitializers, getTypeDescription, hasAliveLoadedTypeInitializers, inject, inject, saveIn, toJar, toJar
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.dynamic.DynamicType
getAllTypes, getAuxiliaryTypes, getBytes, getLoadedTypeInitializers, getTypeDescription, hasAliveLoadedTypeInitializers, inject, inject, saveIn, toJar, toJar
-
-
-
-
Constructor Detail
-
Unloaded
public 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.- Parameters:
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.
-
-
Method Detail
-
load
public DynamicType.Loaded<T> load(java.lang.ClassLoader classLoader)
Description copied from interface:DynamicType.UnloadedAttempts to load this dynamic type including all of its auxiliary types, if any. If the class loader is the bootstrap class loader, a new class loader is created for loading those types. If the class loader is an instance ofInjectionClassLoader, the class is injected. And otherwise, the types are injected into the provided class loader.- Specified by:
loadin interfaceDynamicType.Unloaded<T>- Parameters:
classLoader- The class loader to use for this class loading.- Returns:
- This dynamic type in its loaded state.
-
load
public <S extends java.lang.ClassLoader> DynamicType.Loaded<T> load(S classLoader, ClassLoadingStrategy<? super S> classLoadingStrategy)
Description copied from interface:DynamicType.UnloadedAttempts to load this dynamic type including all of its auxiliary types, if any.- Specified by:
loadin interfaceDynamicType.Unloaded<T>- Type Parameters:
S- The least specific type of class loader this strategy can apply to.- Parameters:
classLoader- The class loader to use for this class loading.classLoadingStrategy- The class loader strategy which should be used for this class loading.- Returns:
- This dynamic type in its loaded state.
- See Also:
ClassLoadingStrategy.Default
-
include
public DynamicType.Unloaded<T> include(DynamicType... dynamicType)
Description copied from interface:DynamicType.UnloadedIncludes the provided dynamic types as auxiliary types of this instance.- Specified by:
includein interfaceDynamicType.Unloaded<T>- Parameters:
dynamicType- The dynamic types to include.- Returns:
- A copy of this unloaded dynamic type which includes the provided dynamic types.
-
include
public DynamicType.Unloaded<T> include(java.util.List<? extends DynamicType> dynamicType)
Description copied from interface:DynamicType.UnloadedIncludes the provided dynamic types as auxiliary types of this instance.- Specified by:
includein interfaceDynamicType.Unloaded<T>- Parameters:
dynamicType- The dynamic types to include.- Returns:
- A copy of this unloaded dynamic type which includes the provided dynamic types.
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classDynamicType.Default
-
hashCode
public int hashCode()
- Overrides:
hashCodein classDynamicType.Default
-
-