Class InstructionClassAdapter
java.lang.Object
org.objectweb.asm.ClassVisitor
de.uzl.its.swat.instrument.instruction.InstructionClassAdapter
public class InstructionClassAdapter
extends org.objectweb.asm.ClassVisitor
A visitor to visit a Java class. The methods of this class must be called in the following order:
visit [ visitSource ] [ visitModule ][ visitNestHost ][ visitOuterClass ] ( visitAnnotation |
visitTypeAnnotation | visitAttribute )* ( visitNestMember | [ * visitPermittedSubclass ] |
visitInnerClass | visitRecordComponent | visitField | visitMethod )* visitEnd.
-
Field Summary
Fields inherited from class org.objectweb.asm.ClassVisitor
api, cv
-
Constructor Summary
ConstructorDescriptionInstructionClassAdapter
(org.objectweb.asm.ClassVisitor cv, String cname) Constructor that calls the super from the default ClassVisitor -
Method Summary
Modifier and TypeMethodDescriptionorg.objectweb.asm.MethodVisitor
visitMethod
(int access, String name, String desc, String signature, String[] exceptions) Visits a method of the class.Methods inherited from class org.objectweb.asm.ClassVisitor
getDelegate, visit, visitAnnotation, visitAttribute, visitEnd, visitField, visitInnerClass, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation
-
Constructor Details
-
InstructionClassAdapter
Constructor that calls the super from the default ClassVisitor- Parameters:
cv
- Parent ClassVisitor
-
-
Method Details
-
visitMethod
public org.objectweb.asm.MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) Visits a method of the class. This method must return a new MethodVisitor instance (or null) each time it is called, i.e., it should not return a previously returned visitor. Addition: Add a custom method visitor that instruments each instruction- Overrides:
visitMethod
in classorg.objectweb.asm.ClassVisitor
- Parameters:
access
- the method's access flags (see Opcodes). This parameter also indicates if the method is synthetic and/or deprecated.name
- the method's name.desc
- the method's descriptor (see Type).signature
- the method's signature. May be null if the method parameters, return type and exceptions do not use generic types.exceptions
- the internal names of the method's exception classes (see Type.getInternalName()). May be null.- Returns:
- an object to visit the byte code of the method, or null if this class visitor is not interested in visiting the code of this method.
-