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 Object
implements MethodRegistry.Prepared
A prepared version of a default method registry.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
An entry of a prepared method registry. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LinkedHashMap<MethodDescription,
MethodRegistry.Default.Prepared.Entry> A map of all method descriptions mapped to their handling entries.private final TypeDescription
The instrumented type.private final LoadedTypeInitializer
The loaded type initializer of the instrumented type.private final MethodGraph.Linked
A method graph describing the instrumented type.private final MethodList<?>
The declared or virtually inherited methods of this type.private final TypeInitializer
The type initializer of the instrumented type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Prepared
(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
Modifier and TypeMethodDescriptioncompile
(Implementation.Target.Factory implementationTargetFactory, ClassFileVersion classFileVersion) Compiles this prepared method registry.MethodList<?>
Returns a list of all methods that should be instrumented.Returns the fully prepared instrumented type.Returns the loaded type initializer of the instrumented type.MethodList<?>
Returns the declared or virtually inherited methods of this type.The type initializer of the instrumented type.
-
Field Details
-
implementations
private final LinkedHashMap<MethodDescription,MethodRegistry.Default.Prepared.Entry> implementationsA 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.
-
-
Constructor Details
-
Prepared
protected Prepared(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 Details
-
getInstrumentedType
Returns the fully prepared instrumented type.- Specified by:
getInstrumentedType
in interfaceMethodRegistry.Prepared
- Returns:
- The fully prepared instrumented type.
-
getLoadedTypeInitializer
Returns the loaded type initializer of the instrumented type.- Specified by:
getLoadedTypeInitializer
in interfaceMethodRegistry.Prepared
- Returns:
- The loaded type initializer of the instrumented type.
-
getTypeInitializer
The type initializer of the instrumented type.- Specified by:
getTypeInitializer
in interfaceMethodRegistry.Prepared
- Returns:
- The type initializer of the instrumented type.
-
getMethods
Returns the declared or virtually inherited methods of this type.- Specified by:
getMethods
in interfaceMethodRegistry.Prepared
- Returns:
- The declared or virtually inherited methods of this type.
-
getInstrumentedMethods
Returns a list of all methods that should be instrumented.- Specified by:
getInstrumentedMethods
in 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:
compile
in 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.
-