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 class
MethodRegistry.Default.Prepared.Entry
An entry of a prepared method registry.
-
Field Summary
Fields Modifier and Type Field Description private java.util.LinkedHashMap<MethodDescription,MethodRegistry.Default.Prepared.Entry>
implementations
A map of all method descriptions mapped to their handling entries.private TypeDescription
instrumentedType
The instrumented type.private LoadedTypeInitializer
loadedTypeInitializer
The loaded type initializer of the instrumented type.private MethodGraph.Linked
methodGraph
A method graph describing the instrumented type.private MethodList<?>
methods
The declared or virtually inherited methods of this type.private TypeInitializer
typeInitializer
The type initializer of the instrumented type.
-
Constructor Summary
Constructors Modifier Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodRegistry.Compiled
compile(Implementation.Target.Factory implementationTargetFactory, ClassFileVersion classFileVersion)
Compiles this prepared method registry.MethodList<?>
getInstrumentedMethods()
Returns a list of all methods that should be instrumented.TypeDescription
getInstrumentedType()
Returns the fully prepared instrumented type.LoadedTypeInitializer
getLoadedTypeInitializer()
Returns the loaded type initializer of the instrumented type.MethodList<?>
getMethods()
Returns the declared or virtually inherited methods of this type.TypeInitializer
getTypeInitializer()
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:
getInstrumentedType
in interfaceMethodRegistry.Prepared
- Returns:
- The fully prepared instrumented type.
-
getLoadedTypeInitializer
public LoadedTypeInitializer 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
public TypeInitializer getTypeInitializer()
The type initializer of the instrumented type.- Specified by:
getTypeInitializer
in 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:
getMethods
in 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:
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.
-
-