Package net.bytebuddy.dynamic.scaffold
Class MethodRegistry.Default.Prepared
- java.lang.Object
-
- net.bytebuddy.dynamic.scaffold.MethodRegistry.Default.Prepared
-
- All Implemented Interfaces:
MethodRegistry.Prepared
- Enclosing class:
- MethodRegistry.Default
@Enhance protected static class MethodRegistry.Default.Prepared extends java.lang.Object implements MethodRegistry.Prepared
A prepared version of a default method registry.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classMethodRegistry.Default.Prepared.EntryAn entry of a prepared method registry.
-
Field Summary
Fields Modifier and Type Field Description private java.util.LinkedHashMap<MethodDescription,MethodRegistry.Default.Prepared.Entry>implementationsA map of all method descriptions mapped to their handling entries.private TypeDescriptioninstrumentedTypeThe instrumented type.private LoadedTypeInitializerloadedTypeInitializerThe loaded type initializer of the instrumented type.private MethodGraph.LinkedmethodGraphA method graph describing the instrumented type.private MethodList<?>methodsThe declared or virtually inherited methods of this type.private TypeInitializertypeInitializerThe type initializer of the instrumented type.
-
Constructor Summary
Constructors Modifier Constructor Description protectedPrepared(java.util.LinkedHashMap<MethodDescription,MethodRegistry.Default.Prepared.Entry> implementations, LoadedTypeInitializer loadedTypeInitializer, TypeInitializer typeInitializer, TypeDescription instrumentedType, MethodGraph.Linked methodGraph, MethodList<?> methods)Creates a prepared version of a default method registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodRegistry.Compiledcompile(Implementation.Target.Factory implementationTargetFactory, ClassFileVersion classFileVersion)Compiles this prepared method registry.MethodList<?>getInstrumentedMethods()Returns a list of all methods that should be instrumented.TypeDescriptiongetInstrumentedType()Returns the fully prepared instrumented type.LoadedTypeInitializergetLoadedTypeInitializer()Returns the loaded type initializer of the instrumented type.MethodList<?>getMethods()Returns the declared or virtually inherited methods of this type.TypeInitializergetTypeInitializer()The type initializer of the instrumented type.
-
-
-
Field Detail
-
implementations
private final java.util.LinkedHashMap<MethodDescription,MethodRegistry.Default.Prepared.Entry> implementations
A map of all method descriptions mapped to their handling entries.
-
loadedTypeInitializer
private final LoadedTypeInitializer loadedTypeInitializer
The loaded type initializer of the instrumented type.
-
typeInitializer
private final TypeInitializer typeInitializer
The type initializer of the instrumented type.
-
instrumentedType
private final TypeDescription instrumentedType
The instrumented type.
-
methodGraph
private final MethodGraph.Linked methodGraph
A method graph describing the instrumented type.
-
methods
private final MethodList<?> methods
The declared or virtually inherited methods of this type.
-
-
Constructor Detail
-
Prepared
protected Prepared(java.util.LinkedHashMap<MethodDescription,MethodRegistry.Default.Prepared.Entry> implementations, LoadedTypeInitializer loadedTypeInitializer, TypeInitializer typeInitializer, TypeDescription instrumentedType, MethodGraph.Linked methodGraph, MethodList<?> methods)
Creates a prepared version of a default method registry.- Parameters:
implementations- A map of all method descriptions mapped to their handling entries.loadedTypeInitializer- The loaded type initializer of the instrumented type.typeInitializer- The type initializer of the instrumented type.instrumentedType- The instrumented type.methodGraph- A method graph describing the instrumented type.methods- The declared or virtually inherited methods of this type.
-
-
Method Detail
-
getInstrumentedType
public TypeDescription getInstrumentedType()
Returns the fully prepared instrumented type.- Specified by:
getInstrumentedTypein interfaceMethodRegistry.Prepared- Returns:
- The fully prepared instrumented type.
-
getLoadedTypeInitializer
public LoadedTypeInitializer getLoadedTypeInitializer()
Returns the loaded type initializer of the instrumented type.- Specified by:
getLoadedTypeInitializerin interfaceMethodRegistry.Prepared- Returns:
- The loaded type initializer of the instrumented type.
-
getTypeInitializer
public TypeInitializer getTypeInitializer()
The type initializer of the instrumented type.- Specified by:
getTypeInitializerin interfaceMethodRegistry.Prepared- Returns:
- The type initializer of the instrumented type.
-
getMethods
public MethodList<?> getMethods()
Returns the declared or virtually inherited methods of this type.- Specified by:
getMethodsin interfaceMethodRegistry.Prepared- Returns:
- The declared or virtually inherited methods of this type.
-
getInstrumentedMethods
public MethodList<?> getInstrumentedMethods()
Returns a list of all methods that should be instrumented.- Specified by:
getInstrumentedMethodsin interfaceMethodRegistry.Prepared- Returns:
- A list of all methods that should be instrumented.
-
compile
public MethodRegistry.Compiled compile(Implementation.Target.Factory implementationTargetFactory, ClassFileVersion classFileVersion)
Compiles this prepared method registry.- Specified by:
compilein interfaceMethodRegistry.Prepared- Parameters:
implementationTargetFactory- A factory for creating an implementation target.classFileVersion- The type's class file version.- Returns:
- A factory for creating an implementation target.
-
-