org.objectweb.asm.tree

Class ClassNode

public class ClassNode extends MemberNode implements ClassVisitor

A node that represents a class.

Author: Eric Bruneton

Field Summary
intaccess
The class's access flags (see {@link org.objectweb.asm.Opcodes}).
Listfields
The fields of this class.
ListinnerClasses
Informations about the inner classes of this class.
Listinterfaces
The internal names of the class's interfaces (see {@link org.objectweb.asm.Type#getInternalName() getInternalName}).
Listmethods
The methods of this class.
Stringname
The internal name of the class (see {@link org.objectweb.asm.Type#getInternalName() getInternalName}).
StringouterClass
The internal name of the enclosing class of the class.
StringouterMethod
The name of the method that contains the class, or null if the class is not enclosed in a method.
StringouterMethodDesc
The descriptor of the method that contains the class, or null if the class is not enclosed in a method.
Stringsignature
The signature of the class.
StringsourceDebug
Debug information to compute the correspondance between source and compiled elements of the class.
StringsourceFile
The name of the source file from which this class was compiled.
StringsuperName
The internal of name of the super class (see {@link org.objectweb.asm.Type#getInternalName() getInternalName}).
intversion
The class version.
Constructor Summary
ClassNode()
Constructs a new {@link ClassNode}.
Method Summary
voidaccept(ClassVisitor cv)
Makes the given class visitor visit this class.
voidvisit(int version, int access, String name, String signature, String superName, String[] interfaces)
voidvisitEnd()
FieldVisitorvisitField(int access, String name, String desc, String signature, Object value)
voidvisitInnerClass(String name, String outerName, String innerName, int access)
MethodVisitorvisitMethod(int access, String name, String desc, String signature, String[] exceptions)
voidvisitOuterClass(String owner, String name, String desc)
voidvisitSource(String file, String debug)

Field Detail

access

public int access
The class's access flags (see {@link org.objectweb.asm.Opcodes}). This field also indicates if the class is deprecated.

fields

public List fields
The fields of this class. This list is a list of {@link FieldNode} objects.

UNKNOWN: org.objectweb.asm.tree.FieldNode

innerClasses

public List innerClasses
Informations about the inner classes of this class. This list is a list of {@link InnerClassNode} objects.

UNKNOWN: org.objectweb.asm.tree.InnerClassNode

interfaces

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

methods

public List methods
The methods of this class. This list is a list of {@link MethodNode} objects.

UNKNOWN: org.objectweb.asm.tree.MethodNode

name

public String name
The internal name of the class (see {@link org.objectweb.asm.Type#getInternalName() getInternalName}).

outerClass

public String outerClass
The internal name of the enclosing class of the class. May be null.

outerMethod

public String outerMethod
The name of the method that contains the class, or null if the class is not enclosed in a method.

outerMethodDesc

public String outerMethodDesc
The descriptor of the method that contains the class, or null if the class is not enclosed in a method.

signature

public String signature
The signature of the class. Mayt be null.

sourceDebug

public String sourceDebug
Debug information to compute the correspondance between source and compiled elements of the class. May be null.

sourceFile

public String sourceFile
The name of the source file from which this class was compiled. May be null.

superName

public String superName
The internal of name of the super class (see {@link org.objectweb.asm.Type#getInternalName() getInternalName}). For interfaces, the super class is {@link Object}. May be null, but only for the {@link Object} class.

version

public int version
The class version.

Constructor Detail

ClassNode

public ClassNode()
Constructs a new {@link ClassNode}.

Method Detail

accept

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

Parameters: cv a class visitor.

visit

public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)

visitEnd

public void visitEnd()

visitField

public FieldVisitor visitField(int access, String name, String desc, String signature, Object value)

visitInnerClass

public void visitInnerClass(String name, String outerName, String innerName, int access)

visitMethod

public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)

visitOuterClass

public void visitOuterClass(String owner, String name, String desc)

visitSource

public void visitSource(String file, String debug)