|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectserp.bytecode.LineNumber
public class LineNumber
A line number corresponds to a sequence of opcodes that map logically to a line of source code.
Method Summary | |
---|---|
void |
acceptVisit(BCVisitor visit)
Accept a visit from a BCVisitor , calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one. |
int |
compareTo(Object other)
|
ClassLoader |
getClassLoader()
Return the class loader to use when loading related classes. |
Code |
getCode()
Returns the Code block that owns the Instruction(s) this InstructionPtr points to. |
int |
getLine()
Return source line number. |
ConstantPool |
getPool()
Return the constant pool of the current class. |
Project |
getProject()
Return the project of the current class. |
Instruction |
getStart()
Return the instruction marking the beginning of this line. |
int |
getStartPc()
Return the index into the code byte array at which this line starts. |
LineNumberTable |
getTable()
Line numbers are stored in a LineNumberTable . |
boolean |
isValid()
Return false if this entity has been removed from its parent; in this case the results of any operations on the entity are undefined. |
void |
replaceTarget(Instruction oldTarget,
Instruction newTarget)
Replace the given old, likely invalid, target with a new target. |
void |
setLine(int lineNumber)
Set the source line number. |
void |
setStart(Instruction instruction)
Set the Instruction marking the beginning this line. |
void |
setStartPc(int startPc)
Set the index into the code byte array at which this line starts. |
void |
updateTargets()
Use the byte indexes read from the class file to calculate and set references to the target instruction(s) for this ptr. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public LineNumberTable getTable()
LineNumberTable
.
public int getLine()
public void setLine(int lineNumber)
public Instruction getStart()
public int getStartPc()
public void setStartPc(int startPc)
public void setStart(Instruction instruction)
Instruction
marking the beginning this line.
The instruction must already be a part of the method.
public void updateTargets()
InstructionPtr
updateTargets
in interface InstructionPtr
public void replaceTarget(Instruction oldTarget, Instruction newTarget)
InstructionPtr
replaceTarget
in interface InstructionPtr
public Project getProject()
BCEntity
getProject
in interface BCEntity
public ConstantPool getPool()
BCEntity
getPool
in interface BCEntity
public ClassLoader getClassLoader()
BCEntity
getClassLoader
in interface BCEntity
public boolean isValid()
BCEntity
isValid
in interface BCEntity
public void acceptVisit(BCVisitor visit)
VisitAcceptor
BCVisitor
, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one.
acceptVisit
in interface VisitAcceptor
public int compareTo(Object other)
compareTo
in interface Comparable
public Code getCode()
InstructionPtr
getCode
in interface InstructionPtr
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |