Constructors Summary |
---|
public LocalVariable(LocalVariable c)Initialize from another object. Note that both objects use the same
references (shallow copy). Use copy() for a physical copy.
this(c.getStartPC(), c.getLength(), c.getNameIndex(),
c.getSignatureIndex(), c.getIndex(), c.getConstantPool());
|
LocalVariable(DataInputStream file, ConstantPool constant_pool)Construct object from file stream.
this(file.readUnsignedShort(), file.readUnsignedShort(),
file.readUnsignedShort(), file.readUnsignedShort(),
file.readUnsignedShort(), constant_pool);
|
public LocalVariable(int start_pc, int length, int name_index, int signature_index, int index, ConstantPool constant_pool)
this.start_pc = start_pc;
this.length = length;
this.name_index = name_index;
this.signature_index = signature_index;
this.index = index;
this.constant_pool = constant_pool;
|
Methods Summary |
---|
public 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.
v.visitLocalVariable(this);
|
public com.sun.org.apache.bcel.internal.classfile.LocalVariable | copy()
try {
return (LocalVariable)clone();
} catch(CloneNotSupportedException e) {}
return null;
|
public final void | dump(java.io.DataOutputStream file)Dump local variable to file stream in binary format.
file.writeShort(start_pc);
file.writeShort(length);
file.writeShort(name_index);
file.writeShort(signature_index);
file.writeShort(index);
|
public final com.sun.org.apache.bcel.internal.classfile.ConstantPool | getConstantPool() return constant_pool;
|
public final int | getIndex() return index;
|
public final int | getLength() return length;
|
public final java.lang.String | getName()
ConstantUtf8 c;
c = (ConstantUtf8)constant_pool.getConstant(name_index, CONSTANT_Utf8);
return c.getBytes();
|
public final int | getNameIndex() return name_index;
|
public final java.lang.String | getSignature()
ConstantUtf8 c;
c = (ConstantUtf8)constant_pool.getConstant(signature_index,
CONSTANT_Utf8);
return c.getBytes();
|
public final int | getSignatureIndex() return signature_index;
|
public final int | getStartPC() return start_pc;
|
public final void | setConstantPool(com.sun.org.apache.bcel.internal.classfile.ConstantPool constant_pool)
this.constant_pool = constant_pool;
|
public final void | setIndex(int index) this.index = index;
|
public final void | setLength(int length)
this.length = length;
|
public final void | setNameIndex(int name_index)
this.name_index = name_index;
|
public final void | setSignatureIndex(int signature_index)
this.signature_index = signature_index;
|
public final void | setStartPC(int start_pc)
this.start_pc = start_pc;
|
public final java.lang.String | toString()
String name = getName(), signature = Utility.signatureToString(getSignature());
return "LocalVariable(start_pc = " + start_pc + ", length = " + length +
", index = " + index + ":" + signature + " " + name + ")";
|