org.objectweb.asm.tree

Class MethodNode

public class MethodNode extends Object

A node that represents a method.

Author: Eric Bruneton

Field Summary
intaccess
The method's access flags (see {@link org.objectweb.asm.Constants}).
Attributeattrs
The non standard attributes of the method.
AttributecodeAttrs
The non standard attributes of the method's code.
Stringdesc
The method's descriptor (see {@link org.objectweb.asm.Type Type}).
Listexceptions
The internal names of the method's exception classes (see {@link org.objectweb.asm.Type#getInternalName() getInternalName}).
Listinstructions
The instructions of this method.
ListlineNumbers
The line numbers of this method.
ListlocalVariables
The local variables of this method.
intmaxLocals
The maximum number of local variables of this method.
intmaxStack
The maximum stack size of this method.
Stringname
The method's name.
ListtryCatchBlocks
The try catch blocks of this method.
Constructor Summary
MethodNode(int access, String name, String desc, String[] exceptions, Attribute attrs)
Constructs a new {@link MethodNode MethodNode} object.
Method Summary
voidaccept(ClassVisitor cv)
Makes the given class visitor visit this method.

Field Detail

access

public int access
The method's access flags (see {@link org.objectweb.asm.Constants}). This field also indicates if the method is synthetic and/or deprecated.

attrs

public Attribute attrs
The non standard attributes of the method.

codeAttrs

public Attribute codeAttrs
The non standard attributes of the method's code.

desc

public String desc
The method's descriptor (see {@link org.objectweb.asm.Type Type}).

exceptions

public final List exceptions
The internal names of the method's exception classes (see {@link org.objectweb.asm.Type#getInternalName() getInternalName}). This list is a list of {@link String} objects.

instructions

public final List instructions
The instructions of this method. This list is a list of {@link AbstractInsnNode AbstractInsnNode} and {@link Label Label} objects.

lineNumbers

public final List lineNumbers
The line numbers of this method. This list is a list of {@link LineNumberNode LineNumberNode} objects.

localVariables

public final List localVariables
The local variables of this method. This list is a list of {@link LocalVariableNode LocalVariableNode} objects.

maxLocals

public int maxLocals
The maximum number of local variables of this method.

maxStack

public int maxStack
The maximum stack size of this method.

name

public String name
The method's name.

tryCatchBlocks

public final List tryCatchBlocks
The try catch blocks of this method. This list is a list of {@link TryCatchBlockNode TryCatchBlockNode} objects.

Constructor Detail

MethodNode

public MethodNode(int access, String name, String desc, String[] exceptions, Attribute attrs)
Constructs a new {@link MethodNode MethodNode} object.

Parameters: access the method's access flags (see {@link org.objectweb.asm.Constants}). This parameter also indicates if the method is synthetic and/or deprecated. name the method's name. desc the method's descriptor (see {@link org.objectweb.asm.Type Type}). exceptions the internal names of the method's exception classes (see {@link org.objectweb.asm.Type#getInternalName() getInternalName}). May be null. attrs the non standard attributes of the method.

Method Detail

accept

public void accept(ClassVisitor cv)
Makes the given class visitor visit this method.

Parameters: cv a class visitor.