Package net.bytebuddy.dynamic
Class DynamicType.Default.Loaded<T>
- java.lang.Object
-
- net.bytebuddy.dynamic.DynamicType.Default
-
- net.bytebuddy.dynamic.DynamicType.Default.Loaded<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.Loaded<T>
- Enclosing class:
- DynamicType.Default
@Enhance protected static class DynamicType.Default.Loaded<T> extends DynamicType.Default implements DynamicType.Loaded<T>
A default implementation of a loaded dynamic type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.dynamic.DynamicType.Default
DynamicType.Default.Dispatcher, 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 Modifier and Type Field Description private java.util.Map<TypeDescription,java.lang.Class<?>>
loadedTypes
The loaded types for the given loaded dynamic type.-
Fields inherited from class net.bytebuddy.dynamic.DynamicType.Default
auxiliaryTypes, binaryRepresentation, DISPATCHER, loadedTypeInitializer, typeDescription
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Loaded(TypeDescription typeDescription, byte[] typeByte, LoadedTypeInitializer loadedTypeInitializer, java.util.List<? extends DynamicType> auxiliaryTypes, java.util.Map<TypeDescription,java.lang.Class<?>> loadedTypes)
Creates a new representation of a loaded dynamic type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends T>
getLoaded()
Returns the loaded main class.java.util.Map<TypeDescription,java.lang.Class<?>>
getLoadedAuxiliaryTypes()
Returns a map of all loaded auxiliary types to this dynamic type.-
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, equals, finalize, getClass, hashCode, 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
-
-
-
-
Field Detail
-
loadedTypes
private final java.util.Map<TypeDescription,java.lang.Class<?>> loadedTypes
The loaded types for the given loaded dynamic type.
-
-
Constructor Detail
-
Loaded
protected Loaded(TypeDescription typeDescription, byte[] typeByte, LoadedTypeInitializer loadedTypeInitializer, java.util.List<? extends DynamicType> auxiliaryTypes, java.util.Map<TypeDescription,java.lang.Class<?>> loadedTypes)
Creates a new representation of a loaded dynamic type.- Parameters:
typeDescription
- A description of this dynamic type.typeByte
- 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.loadedTypes
- A map of loaded types for this dynamic type and all its auxiliary types.
-
-
Method Detail
-
getLoaded
public java.lang.Class<? extends T> getLoaded()
Returns the loaded main class.- Specified by:
getLoaded
in interfaceDynamicType.Loaded<T>
- Returns:
- A loaded class representation of this dynamic type.
-
getLoadedAuxiliaryTypes
public java.util.Map<TypeDescription,java.lang.Class<?>> getLoadedAuxiliaryTypes()
Returns a map of all loaded auxiliary types to this dynamic type.
Note: The type descriptions will most likely differ from the binary representation of this type. Normally, annotations and intercepted methods are not added to the type descriptions of auxiliary types.
- Specified by:
getLoadedAuxiliaryTypes
in interfaceDynamicType.Loaded<T>
- Returns:
- A mapping from the fully qualified names of all auxiliary types to their loaded class representations.
-
-