Methods Summary |
---|
public abstract void | accept(com.sun.org.apache.bcel.internal.classfile.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.
|
public java.lang.Object | clone()
return super.clone();
|
public com.sun.org.apache.bcel.internal.classfile.Constant | copy()
try {
return (Constant)super.clone();
} catch(CloneNotSupportedException e) {}
return null;
|
public abstract void | dump(java.io.DataOutputStream file)
|
public final byte | getTag() return tag;
|
static final com.sun.org.apache.bcel.internal.classfile.Constant | readConstant(java.io.DataInputStream file)Read one constant from the given file, the type depends on a tag byte.
byte b = file.readByte(); // Read tag byte
switch(b) {
case Constants.CONSTANT_Class: return new ConstantClass(file);
case Constants.CONSTANT_Fieldref: return new ConstantFieldref(file);
case Constants.CONSTANT_Methodref: return new ConstantMethodref(file);
case Constants.CONSTANT_InterfaceMethodref: return new
ConstantInterfaceMethodref(file);
case Constants.CONSTANT_String: return new ConstantString(file);
case Constants.CONSTANT_Integer: return new ConstantInteger(file);
case Constants.CONSTANT_Float: return new ConstantFloat(file);
case Constants.CONSTANT_Long: return new ConstantLong(file);
case Constants.CONSTANT_Double: return new ConstantDouble(file);
case Constants.CONSTANT_NameAndType: return new ConstantNameAndType(file);
case Constants.CONSTANT_Utf8: return new ConstantUtf8(file);
default:
throw new ClassFormatException("Invalid byte tag in constant pool: " + b);
}
|
public java.lang.String | toString()
return Constants.CONSTANT_NAMES[tag] + "[" + tag + "]";
|