Package net.bytebuddy.asm
Class Advice.Dispatcher.Inlining
- java.lang.Object
-
- net.bytebuddy.asm.Advice.Dispatcher.Inlining
-
- All Implemented Interfaces:
Advice.Dispatcher
,Advice.Dispatcher.Unresolved
- Enclosing interface:
- Advice.Dispatcher
public static class Advice.Dispatcher.Inlining extends java.lang.Object implements Advice.Dispatcher.Unresolved
A dispatcher for an advice method that is being inlined into the instrumented method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Advice.Dispatcher.Inlining.CodeTranslationVisitor
A visitor for translating an advice method's byte code for inlining into the instrumented method.protected static class
Advice.Dispatcher.Inlining.Resolved
A resolved version of a dispatcher.-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.Dispatcher
Advice.Dispatcher.Bound, Advice.Dispatcher.Delegating, Advice.Dispatcher.Inactive, Advice.Dispatcher.Inlining, Advice.Dispatcher.RelocationHandler, Advice.Dispatcher.SuppressionHandler, Advice.Dispatcher.Unresolved
-
-
Field Summary
Fields Modifier and Type Field Description protected MethodDescription.InDefinedShape
adviceMethod
The advice method.-
Fields inherited from interface net.bytebuddy.asm.Advice.Dispatcher
IGNORE_ANNOTATION, IGNORE_METHOD
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Inlining(MethodDescription.InDefinedShape adviceMethod)
Creates a dispatcher for inlined advice method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Advice.Dispatcher.Resolved.ForMethodEnter
asMethodEnter(java.util.List<? extends Advice.OffsetMapping.Factory<?>> userFactories, org.objectweb.asm.ClassReader classReader, Advice.Dispatcher.Unresolved methodExit)
Resolves this dispatcher as a dispatcher for entering a method.Advice.Dispatcher.Resolved.ForMethodExit
asMethodExit(java.util.List<? extends Advice.OffsetMapping.Factory<?>> userFactories, org.objectweb.asm.ClassReader classReader, Advice.Dispatcher.Unresolved methodEnter)
Resolves this dispatcher as a dispatcher for exiting a method.TypeDescription
getAdviceType()
The type that is produced as a result of executing this advice method.boolean
isAlive()
Returnstrue
if this dispatcher is alive.boolean
isBinary()
Indicates that this dispatcher requires access to the class file declaring the advice method.
-
-
-
Field Detail
-
adviceMethod
protected final MethodDescription.InDefinedShape adviceMethod
The advice method.
-
-
Constructor Detail
-
Inlining
protected Inlining(MethodDescription.InDefinedShape adviceMethod)
Creates a dispatcher for inlined advice method.- Parameters:
adviceMethod
- The advice method.
-
-
Method Detail
-
isAlive
public boolean isAlive()
Description copied from interface:Advice.Dispatcher
Returnstrue
if this dispatcher is alive.- Specified by:
isAlive
in interfaceAdvice.Dispatcher
- Returns:
true
if this dispatcher is alive.
-
isBinary
public boolean isBinary()
Description copied from interface:Advice.Dispatcher.Unresolved
Indicates that this dispatcher requires access to the class file declaring the advice method.- Specified by:
isBinary
in interfaceAdvice.Dispatcher.Unresolved
- Returns:
true
if this dispatcher requires access to the advice method's class file.
-
getAdviceType
public TypeDescription getAdviceType()
Description copied from interface:Advice.Dispatcher.Unresolved
The type that is produced as a result of executing this advice method.- Specified by:
getAdviceType
in interfaceAdvice.Dispatcher.Unresolved
- Returns:
- A description of the type that is produced by this advice method.
-
asMethodEnter
public Advice.Dispatcher.Resolved.ForMethodEnter asMethodEnter(java.util.List<? extends Advice.OffsetMapping.Factory<?>> userFactories, org.objectweb.asm.ClassReader classReader, Advice.Dispatcher.Unresolved methodExit)
Description copied from interface:Advice.Dispatcher.Unresolved
Resolves this dispatcher as a dispatcher for entering a method.- Specified by:
asMethodEnter
in interfaceAdvice.Dispatcher.Unresolved
- Parameters:
userFactories
- A list of custom factories for binding parameters of an advice method.classReader
- A class reader to query for a class file which might benull
if this dispatcher is not binary.methodExit
- The unresolved dispatcher for the method exit advice.- Returns:
- This dispatcher as a dispatcher for entering a method.
-
asMethodExit
public Advice.Dispatcher.Resolved.ForMethodExit asMethodExit(java.util.List<? extends Advice.OffsetMapping.Factory<?>> userFactories, org.objectweb.asm.ClassReader classReader, Advice.Dispatcher.Unresolved methodEnter)
Description copied from interface:Advice.Dispatcher.Unresolved
Resolves this dispatcher as a dispatcher for exiting a method.- Specified by:
asMethodExit
in interfaceAdvice.Dispatcher.Unresolved
- Parameters:
userFactories
- A list of custom factories for binding parameters of an advice method.classReader
- A class reader to query for a class file which might benull
if this dispatcher is not binary.methodEnter
- The unresolved dispatcher for the method enter advice.- Returns:
- This dispatcher as a dispatcher for exiting a method.
-
-