jellyj.classfile.javaclass
Class Constant

Direct Known Subclasses:
ConstantClass, ConstantCP, ConstantDouble, ConstantFloat, ConstantInteger, ConstantLong, ConstantNameAndType, ConstantString, ConstantUnicode, ConstantUtf8

public abstract class Constant
implements Constants

Abstract superclass for classes to represent the different constant types in the constant pool of a class file. The classes keep closely to the JVM specification.

Author:
JellyJ Design Group
See Also: ConstantClass, ConstantFieldref, ConstantMethodref, ConstantInterfaceMethodref, ConstantString, ConstantInteger, ConstantFloat, ConstantLong, ConstantDouble, ConstantNameAndType, ConstantUtf8, ConstantUnicode

Method Summary
 abstract voidaccept(Visitor v)
          Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
 abstract voiddump(DataOutputStream file)
           
 final bytegetTag()
           
 StringtoString()
           

Method Detail

accept

public abstract void accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
Parameters:
v - Visitor object

dump

public abstract void dump(DataOutputStream file)
throws java.io.IOException

getTag

public final byte getTag()
Returns: Tag of constant, i.e. its type. No setTag() method to avoid confusion.

toString

public String toString()
Returns: String representation.