Package net.bytebuddy.asm
Class Advice.BootstrapArgumentResolver.ForDefaultValues
- java.lang.Object
-
- net.bytebuddy.asm.Advice.BootstrapArgumentResolver.ForDefaultValues
-
- All Implemented Interfaces:
Advice.BootstrapArgumentResolver
- Enclosing interface:
- Advice.BootstrapArgumentResolver
@Enhance public static class Advice.BootstrapArgumentResolver.ForDefaultValues extends java.lang.Object implements Advice.BootstrapArgumentResolver
An argument resolver that supplies a default selection of arguments. The explicitly resolved constant values are:- A
Stringof the target's binary class name. - A
intwith value0for an enter advice and {code 1} for an exist advice. - A
Classrepresenting the class implementing the instrumented method. - A
Stringwith the name of the instrumented method. - A
java.lang.invoke.MethodHandlerepresenting the instrumented method unless the target is the type's static initializer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAdvice.BootstrapArgumentResolver.ForDefaultValues.FactoryA factory for creating aAdvice.BootstrapArgumentResolver.ForDefaultValues.-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.BootstrapArgumentResolver
Advice.BootstrapArgumentResolver.ForDefaultValues
-
-
Field Summary
Fields Modifier and Type Field Description private MethodDescription.InDefinedShapeadviceMethodThe advice method.private booleanexittrueif the advice is applied as exit advice.
-
Constructor Summary
Constructors Modifier Constructor Description protectedForDefaultValues(MethodDescription.InDefinedShape adviceMethod, boolean exit)Creates a bootstrap argument resolver with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<JavaConstant>resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod)Resolves the constants that are provided as arguments to the bootstrap methods.
-
-
-
Field Detail
-
adviceMethod
private final MethodDescription.InDefinedShape adviceMethod
The advice method.
-
exit
private final boolean exit
trueif the advice is applied as exit advice.
-
-
Constructor Detail
-
ForDefaultValues
protected ForDefaultValues(MethodDescription.InDefinedShape adviceMethod, boolean exit)
Creates a bootstrap argument resolver with default values.- Parameters:
adviceMethod- The advice method.exit-trueif the advice is applied as exit advice.
-
-
Method Detail
-
resolve
public java.util.List<JavaConstant> resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Resolves the constants that are provided as arguments to the bootstrap methods.- Specified by:
resolvein interfaceAdvice.BootstrapArgumentResolver- Parameters:
instrumentedType- The instrumented type.instrumentedMethod- The instrumented method.- Returns:
- A list of constants to supply as arguments to the bootstrap method.
-
-