Class MethodRegistry.Default.Compiled
java.lang.Object
net.bytebuddy.dynamic.scaffold.MethodRegistry.Default.Compiled
- All Implemented Interfaces:
MethodRegistry.Compiled, TypeWriter.MethodPool
- Enclosing class:
MethodRegistry.Default
@Enhance
protected static class MethodRegistry.Default.Compiled
extends Object
implements MethodRegistry.Compiled
A compiled version of a default method registry.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAn entry of a compiled method registry.Nested classes/interfaces inherited from interface TypeWriter.MethodPool
TypeWriter.MethodPool.Record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LinkedHashMap<MethodDescription, MethodRegistry.Default.Compiled.Entry> A map of all method descriptions mapped to their handling entries.private final TypeDescriptionThe instrumented type.private final LoadedTypeInitializerThe loaded type initializer of the instrumented type.private final MethodList<?> The declared or virtually inherited methods of this type.private final booleantrueif the created type supports bridge methods.private final TypeInitializerThe type initializer of the instrumented type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompiled(TypeDescription instrumentedType, LoadedTypeInitializer loadedTypeInitializer, TypeInitializer typeInitializer, MethodList<?> methods, LinkedHashMap<MethodDescription, MethodRegistry.Default.Compiled.Entry> implementations, boolean supportsBridges) Creates a new compiled version of a default method registry. -
Method Summary
Modifier and TypeMethodDescriptionMethodList<?> Returns a list of all methods that should be instrumented.Returns the instrumented type that is to be created.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.target(MethodDescription methodDescription) Looks up a handler entry for a given method.
-
Field Details
-
instrumentedType
The instrumented type. -
loadedTypeInitializer
The loaded type initializer of the instrumented type. -
typeInitializer
The type initializer of the instrumented type. -
methods
The declared or virtually inherited methods of this type. -
implementations
private final LinkedHashMap<MethodDescription, MethodRegistry.Default.Compiled.Entry> implementationsA map of all method descriptions mapped to their handling entries. -
supportsBridges
private final boolean supportsBridgestrueif the created type supports bridge methods.
-
-
Constructor Details
-
Compiled
protected Compiled(TypeDescription instrumentedType, LoadedTypeInitializer loadedTypeInitializer, TypeInitializer typeInitializer, MethodList<?> methods, LinkedHashMap<MethodDescription, MethodRegistry.Default.Compiled.Entry> implementations, boolean supportsBridges) Creates a new compiled version of a default method registry.- Parameters:
instrumentedType- The instrumented type.loadedTypeInitializer- The loaded type initializer of the instrumented type.typeInitializer- The type initializer of the instrumented type.methods- The declared or virtually inherited methods of this type.implementations- A map of all method descriptions mapped to their handling entries.supportsBridges-trueif the created type supports bridge methods.
-
-
Method Details
-
getInstrumentedType
Returns the instrumented type that is to be created.- Specified by:
getInstrumentedTypein interfaceMethodRegistry.Compiled- Returns:
- The instrumented type that is to be created.
-
getLoadedTypeInitializer
Returns the loaded type initializer of the instrumented type.- Specified by:
getLoadedTypeInitializerin interfaceMethodRegistry.Compiled- Returns:
- The loaded type initializer of the instrumented type.
-
getTypeInitializer
The type initializer of the instrumented type.- Specified by:
getTypeInitializerin interfaceMethodRegistry.Compiled- Returns:
- The type initializer of the instrumented type.
-
getMethods
Returns the declared or virtually inherited methods of this type.- Specified by:
getMethodsin interfaceMethodRegistry.Compiled- Returns:
- The declared or virtually inherited methods of this type.
-
getInstrumentedMethods
Returns a list of all methods that should be instrumented.- Specified by:
getInstrumentedMethodsin interfaceMethodRegistry.Compiled- Returns:
- A list of all methods that should be instrumented.
-
target
Looks up a handler entry for a given method.- Specified by:
targetin interfaceTypeWriter.MethodPool- Parameters:
methodDescription- The method being processed.- Returns:
- A handler entry for the given method.
-