Package net.bytebuddy.asm
Class MemberSubstitution.SubstitutingMethodVisitor
- java.lang.Object
-
- org.objectweb.asm.MethodVisitor
-
- net.bytebuddy.asm.MemberSubstitution.SubstitutingMethodVisitor
-
- Enclosing class:
- MemberSubstitution
protected static class MemberSubstitution.SubstitutingMethodVisitor extends org.objectweb.asm.MethodVisitor
A method visitor that applies a substitution for matched methods.
-
-
Field Summary
Fields Modifier and Type Field Description private Implementation.Context
implementationContext
The implementation context to use.private TypeDescription
instrumentedType
The instrumented type.private MethodGraph.Compiler
methodGraphCompiler
The method graph compiler to use.private MemberSubstitution.Replacement
replacement
The replacement to use for creating substitutions.private int
stackSizeBuffer
An additional buffer for the operand stack that is required.private boolean
strict
true
if the method processing should be strict where an exception is raised if a member cannot be found.private TypePool
typePool
The type pool to use.
-
Constructor Summary
Constructors Modifier Constructor Description protected
SubstitutingMethodVisitor(org.objectweb.asm.MethodVisitor methodVisitor, TypeDescription instrumentedType, MethodGraph.Compiler methodGraphCompiler, boolean strict, MemberSubstitution.Replacement replacement, Implementation.Context implementationContext, TypePool typePool)
Creates a new substituting method visitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visitFieldInsn(int opcode, java.lang.String owner, java.lang.String internalName, java.lang.String descriptor)
void
visitMaxs(int maxStack, int maxLocals)
void
visitMethodInsn(int opcode, java.lang.String owner, java.lang.String internalName, java.lang.String descriptor, boolean isInterface)
-
Methods inherited from class org.objectweb.asm.MethodVisitor
visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFrame, visitIincInsn, visitInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitParameterAnnotation, visitTableSwitchInsn, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation, visitTypeInsn, visitVarInsn
-
-
-
-
Field Detail
-
instrumentedType
private final TypeDescription instrumentedType
The instrumented type.
-
methodGraphCompiler
private final MethodGraph.Compiler methodGraphCompiler
The method graph compiler to use.
-
strict
private final boolean strict
true
if the method processing should be strict where an exception is raised if a member cannot be found.
-
replacement
private final MemberSubstitution.Replacement replacement
The replacement to use for creating substitutions.
-
implementationContext
private final Implementation.Context implementationContext
The implementation context to use.
-
typePool
private final TypePool typePool
The type pool to use.
-
stackSizeBuffer
private int stackSizeBuffer
An additional buffer for the operand stack that is required.
-
-
Constructor Detail
-
SubstitutingMethodVisitor
protected SubstitutingMethodVisitor(org.objectweb.asm.MethodVisitor methodVisitor, TypeDescription instrumentedType, MethodGraph.Compiler methodGraphCompiler, boolean strict, MemberSubstitution.Replacement replacement, Implementation.Context implementationContext, TypePool typePool)
Creates a new substituting method visitor.- Parameters:
methodVisitor
- The method visitor to delegate to.instrumentedType
- The instrumented type.methodGraphCompiler
- The method graph compiler to use.strict
-true
if the method processing should be strict where an exception is raised if a member cannot be found.replacement
- The replacement to use for creating substitutions.implementationContext
- The implementation context to use.typePool
- The type pool to use.
-
-
Method Detail
-
visitFieldInsn
public void visitFieldInsn(int opcode, java.lang.String owner, java.lang.String internalName, java.lang.String descriptor)
- Overrides:
visitFieldInsn
in classorg.objectweb.asm.MethodVisitor
-
visitMethodInsn
public void visitMethodInsn(int opcode, java.lang.String owner, java.lang.String internalName, java.lang.String descriptor, boolean isInterface)
- Overrides:
visitMethodInsn
in classorg.objectweb.asm.MethodVisitor
-
visitMaxs
public void visitMaxs(int maxStack, int maxLocals)
- Overrides:
visitMaxs
in classorg.objectweb.asm.MethodVisitor
-
-