Class DynamicType.Default.Loaded<T>
java.lang.Object
net.bytebuddy.dynamic.DynamicType.AbstractBase
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:
Closeable, AutoCloseable, ClassFileLocator, 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 DynamicType.Default
DynamicType.Default.Loaded<T>, DynamicType.Default.Unloaded<T>Nested classes/interfaces inherited from interface ClassFileLocator
ClassFileLocator.Compound, ClassFileLocator.Filtering, ClassFileLocator.ForClassLoader, ClassFileLocator.ForFolder, ClassFileLocator.ForInstrumentation, ClassFileLocator.ForJarFile, ClassFileLocator.ForModule, ClassFileLocator.ForModuleFile, ClassFileLocator.ForUrl, ClassFileLocator.MultiReleaseAware, ClassFileLocator.NoOp, ClassFileLocator.PackageDiscriminating, ClassFileLocator.Resolution, ClassFileLocator.SimpleNested classes/interfaces inherited from interface DynamicType
DynamicType.AbstractBase, DynamicType.Builder<T>, DynamicType.Default, DynamicType.Loaded<T>, DynamicType.Unloaded<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<TypeDescription, Class<?>> The loaded types for the given loaded dynamic type.Fields inherited from class DynamicType.Default
auxiliaryTypes, binaryRepresentation, loadedTypeInitializer, typeDescriptionFields inherited from interface ClassFileLocator
CLASS_FILE_EXTENSION, META_INF_VERSIONS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLoaded(TypeDescription typeDescription, byte[] typeByte, LoadedTypeInitializer loadedTypeInitializer, List<? extends DynamicType> auxiliaryTypes, Map<TypeDescription, Class<?>> loadedTypes) Creates a new representation of a loaded dynamic type. -
Method Summary
Modifier and TypeMethodDescriptionMap<TypeDescription, Class<?>> Returns all loaded types that are implied by this dynamic type.Returns the loaded main class.Map<TypeDescription, Class<?>> Returns a map of all loaded auxiliary types to this dynamic type.Methods inherited from class DynamicType.Default
getAuxiliaries, getBytes, getLoadedTypeInitializer, getTypeDescriptionMethods inherited from class DynamicType.AbstractBase
close, getAllTypeDescriptions, getAllTypes, getAuxiliaryTypeDescriptions, getAuxiliaryTypes, getLoadedTypeInitializers, hasAliveLoadedTypeInitializers, inject, inject, locate, saveIn, toJar, toJarMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ClassFileLocator
locateMethods inherited from interface DynamicType
close, getAllTypeDescriptions, getAllTypes, getAuxiliaries, getAuxiliaryTypeDescriptions, getAuxiliaryTypes, getBytes, getLoadedTypeInitializer, getLoadedTypeInitializers, getTypeDescription, hasAliveLoadedTypeInitializers, inject, inject, saveIn, toJar, toJar
-
Field Details
-
loadedTypes
The loaded types for the given loaded dynamic type.
-
-
Constructor Details
-
Loaded
protected Loaded(TypeDescription typeDescription, byte[] typeByte, LoadedTypeInitializer loadedTypeInitializer, List<? extends DynamicType> auxiliaryTypes, Map<TypeDescription, 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 Details
-
getLoaded
Returns the loaded main class.- Specified by:
getLoadedin interfaceDynamicType.Loaded<T>- Returns:
- A loaded class representation of this dynamic type.
-
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:
getLoadedAuxiliaryTypesin interfaceDynamicType.Loaded<T>- Returns:
- A mapping from the fully qualified names of all auxiliary types to their loaded class representations.
-
getAllLoaded
Returns all loaded types that are implied by this dynamic type.- Specified by:
getAllLoadedin interfaceDynamicType.Loaded<T>- Returns:
- All loaded types that are implied by this dynamic type.
-