Package net.bytebuddy.dynamic.scaffold
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
protected static class MethodRegistry.Default.Compiled extends java.lang.Object implements MethodRegistry.Compiled
A compiled version of a default method registry.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classMethodRegistry.Default.Compiled.EntryAn entry of a compiled method registry.-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.TypeWriter.MethodPool
TypeWriter.MethodPool.Record
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompiled(TypeDescription instrumentedType, LoadedTypeInitializer loadedTypeInitializer, TypeInitializer typeInitializer, MethodList<?> methods, java.util.LinkedHashMap<MethodDescription,MethodRegistry.Default.Compiled.Entry> implementations, boolean supportsBridges)Creates a new compiled version of a default method registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodList<?>getInstrumentedMethods()Returns a list of all methods that should be instrumented.TypeDescriptiongetInstrumentedType()Returns the instrumented type that is to be created.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.TypeWriter.MethodPool.Recordtarget(MethodDescription methodDescription)Looks up a handler entry for a given method.
-
-
-
Constructor Detail
-
Compiled
protected Compiled(TypeDescription instrumentedType, LoadedTypeInitializer loadedTypeInitializer, TypeInitializer typeInitializer, MethodList<?> methods, java.util.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 Detail
-
getInstrumentedType
public TypeDescription getInstrumentedType()
Description copied from interface:MethodRegistry.CompiledReturns the instrumented type that is to be created.- Specified by:
getInstrumentedTypein interfaceMethodRegistry.Compiled- Returns:
- The instrumented type that is to be created.
-
getLoadedTypeInitializer
public LoadedTypeInitializer getLoadedTypeInitializer()
Description copied from interface:MethodRegistry.CompiledReturns the loaded type initializer of the instrumented type.- Specified by:
getLoadedTypeInitializerin interfaceMethodRegistry.Compiled- Returns:
- The loaded type initializer of the instrumented type.
-
getTypeInitializer
public TypeInitializer getTypeInitializer()
Description copied from interface:MethodRegistry.CompiledThe type initializer of the instrumented type.- Specified by:
getTypeInitializerin interfaceMethodRegistry.Compiled- Returns:
- The type initializer of the instrumented type.
-
getMethods
public MethodList<?> getMethods()
Description copied from interface:MethodRegistry.CompiledReturns 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
public MethodList<?> getInstrumentedMethods()
Description copied from interface:MethodRegistry.CompiledReturns 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
public TypeWriter.MethodPool.Record target(MethodDescription methodDescription)
Description copied from interface:TypeWriter.MethodPoolLooks 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.
-
-