|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmars.assembler.SourceLine
public class SourceLine
Handy class to represent, for a given line of source code, the code itself, the program containing it, and its line number within that program. This is used to separately keep track of the original file/position of a given line of code. When .include is used, it will migrate to a different line and possibly different program but the migration should not be visible to the user.
Constructor Summary | |
---|---|
SourceLine(String source,
MIPSprogram mipsProgram,
int lineNumber)
SourceLine constructor |
Method Summary | |
---|---|
String |
getFilename()
Retrieve name of file containing source statement |
int |
getLineNumber()
Retrieve line number of source statement |
MIPSprogram |
getMIPSprogram()
Retrieve MIPSprogram object containing source statement |
String |
getSource()
Retrieve source statement itself |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceLine(String source, MIPSprogram mipsProgram, int lineNumber)
source
- The source code itselfmipsProgram
- The program (object representing source file) containing that linelineNumber
- The line number within that program where source appears.Method Detail |
---|
public String getSource()
public String getFilename()
public int getLineNumber()
public MIPSprogram getMIPSprogram()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |