net.sf.rej.java.attribute
Class LineNumberTableAttribute
java.lang.Object
net.sf.rej.java.attribute.Attribute
net.sf.rej.java.attribute.LineNumberTableAttribute
public class LineNumberTableAttribute
- extends Attribute
Method Summary |
int |
getLineNumber(int pc)
|
byte[] |
getLineNumberData()
|
byte[] |
getPayload()
|
void |
invalidate()
Informs this line number table that the instructions which are being
associated with line numbers have changed and before allowing queries
or serialization to be made, the table has to be recalculated. |
void |
setCode(Code code)
Sets the relevant code block for determining changes in the linenumber
table. |
void |
setPayload(byte[] data)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LineNumberTableAttribute
public LineNumberTableAttribute(int nameIndex,
ConstantPool pool)
getLineNumber
public int getLineNumber(int pc)
getPayload
public byte[] getPayload()
- Overrides:
getPayload
in class Attribute
setPayload
public void setPayload(byte[] data)
- Overrides:
setPayload
in class Attribute
getLineNumberData
public byte[] getLineNumberData()
toString
public java.lang.String toString()
- Overrides:
toString
in class Attribute
setCode
public void setCode(Code code)
- Sets the relevant code block for determining changes in the linenumber
table.
- Parameters:
code
-
invalidate
public void invalidate()
- Informs this line number table that the instructions which are being
associated with line numbers have changed and before allowing queries
or serialization to be made, the table has to be recalculated. No
immediate recalculation is done, however. A lazy approach is used
instead. The line number query and attribute serialization methods
check for the validity of the table and recalculate it if necessary
before returning the requested data.