org.objectweb.asm.tree

Class ClassNode

Implemented Interfaces:
ClassVisitor

public class ClassNode
extends MemberNode
implements ClassVisitor

A node that represents a class.

Author:
Eric Bruneton

Field Summary

int
access
The class's access flags (see Opcodes).
List
fields
The fields of this class.
List
innerClasses
Informations about the inner classes of this class.
List
interfaces
The internal names of the class's interfaces (see getInternalName).
List
methods
The methods of this class.
String
name
The internal name of the class (see getInternalName).
String
outerClass
The internal name of the enclosing class of the class.
String
outerMethod
The name of the method that contains the class, or null if the class is not enclosed in a method.
String
outerMethodDesc
The descriptor of the method that contains the class, or null if the class is not enclosed in a method.
String
signature
The signature of the class.
String
sourceDebug
Debug information to compute the correspondance between source and compiled elements of the class.
String
sourceFile
The name of the source file from which this class was compiled.
String
superName
The internal of name of the super class (see getInternalName).
int
version
The class version.

Fields inherited from class org.objectweb.asm.tree.MemberNode

attrs, invisibleAnnotations, visibleAnnotations

Constructor Summary

ClassNode()
Constructs a new ClassNode.

Method Summary

void
accept(ClassVisitor cv)
Makes the given class visitor visit this class.
void
visit(int version, int access, String name, String signature, String superName, String[] interfaces)
void
visitEnd()
Visits the end of this class, field or method.
FieldVisitor
visitField(int access, String name, String desc, String signature, Object value)
void
visitInnerClass(String name, String outerName, String innerName, int access)
MethodVisitor
visitMethod(int access, String name, String desc, String signature, String[] exceptions)
void
visitOuterClass(String owner, String name, String desc)
void
visitSource(String file, String debug)

Methods inherited from class org.objectweb.asm.tree.MemberNode

visitAnnotation, visitAttribute, visitEnd

Field Details

access

public int access
The class's access flags (see Opcodes). This field also indicates if the class is deprecated.


fields

public final List fields


innerClasses

public final List innerClasses


interfaces

public final List interfaces


methods

public final List methods


name

public String name


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 getInternalName). For interfaces, the super class is Object. May be null, but only for the Object class.


version

public int version
The class version.

Constructor Details

ClassNode

public ClassNode()

Method Details

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)
Specified by:
visit in interface ClassVisitor


visitEnd

public void visitEnd()
Visits the end of this class, field or method.
Specified by:
visitEnd in interface ClassVisitor
Overrides:
visitEnd in interface MemberNode


visitField

public FieldVisitor visitField(int access,
                               String name,
                               String desc,
                               String signature,
                               Object value)
Specified by:
visitField in interface ClassVisitor


visitInnerClass

public void visitInnerClass(String name,
                            String outerName,
                            String innerName,
                            int access)
Specified by:
visitInnerClass in interface ClassVisitor


visitMethod

public MethodVisitor visitMethod(int access,
                                 String name,
                                 String desc,
                                 String signature,
                                 String[] exceptions)
Specified by:
visitMethod in interface ClassVisitor


visitOuterClass

public void visitOuterClass(String owner,
                            String name,
                            String desc)
Specified by:
visitOuterClass in interface ClassVisitor


visitSource

public void visitSource(String file,
                        String debug)
Specified by:
visitSource in interface ClassVisitor