|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttools.code.CodeLine
public class CodeLine
This class encapsulates a single line of assembly or disassembly. Example of Assembly: 0xF000: MySpot: LDA MYVAL-2[SPOTA-SPOTB+10] ; Comment Example of Disassembly: F000: 80 40 55 55 LDA 0x20[0x0400]
| Constructor Summary | |
|---|---|
CodeLine(java.lang.String code,
java.lang.String filename,
int lineNumber)
This constructs a new CodeLine with the given original text. |
|
CodeLine(java.lang.String code,
java.lang.String filename,
int lineNumber,
boolean hexAddress)
|
|
| Method Summary | |
|---|---|
int |
getAddress()
This method returns the code address or -1 if there is none. |
java.lang.String |
getComment()
This method returns the code comment or null if there is none. |
int[] |
getData()
This method returns the code data or null if there is none. |
java.lang.String |
getError()
This method returns any errors attached to the line or null if none. |
java.lang.String |
getErrorDescription()
This method returns the complete description of an error for the line. |
java.lang.String |
getFilename()
This method returns the name of the file the line was loaded from. |
java.util.List<java.lang.String> |
getLabels()
This method returns all labels attached to this assembly line. |
int |
getLineNumber()
This method returns the line number of the file this line was loaded from. |
Opcode |
getOpcode()
This method gets the line's opcode or null if none. |
java.util.Map<java.lang.String,OpcodeParameterInfo> |
getOpcodeParamInfo()
This method returns the map of opcode-parameter information. |
java.lang.String |
getOpcodeString()
This method returns the mnemonic text. |
java.lang.String |
getOriginalText()
This method returns the original code text. |
java.lang.String |
getSpecialCommentData()
This method returns the data of a system-targeted comment. |
boolean |
isDirective()
This method returns true if the line has been flagged as an assembler directive. |
void |
setAddress(int address)
This sets the code address. |
void |
setComment(java.lang.String comment)
This sets the code's comment. |
void |
setData(int[] data)
This sets the code's data. |
void |
setDirective(boolean directive)
This method flags a line as an assembler directive. |
void |
setError(java.lang.String error)
This method attaches an error to the code line. |
void |
setOpcode(Opcode opcode)
This method sets the line's opcode. |
void |
setOpcodeString(java.lang.String t)
This sets the opcode string. |
void |
setOriginalText(java.lang.String originalText)
This sets the line's "original text". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CodeLine(java.lang.String code,
java.lang.String filename,
int lineNumber)
code - the original line of codefilename - the name of the file this line came fromlineNumber - the line-number in the file this came fromhexAddress - true if the address is just a 4-byte hex number (like with disassembly)
public CodeLine(java.lang.String code,
java.lang.String filename,
int lineNumber,
boolean hexAddress)
| Method Detail |
|---|
public java.lang.String getSpecialCommentData()
public boolean isDirective()
public void setDirective(boolean directive)
directive - true if this is an assembler directivepublic java.util.List<java.lang.String> getLabels()
public int getAddress()
public void setAddress(int address)
address - the new addresspublic int[] getData()
public void setData(int[] data)
data - the code's datapublic java.lang.String getComment()
public void setComment(java.lang.String comment)
comment - the commentpublic java.lang.String getOriginalText()
public void setOriginalText(java.lang.String originalText)
originalText - the original textpublic Opcode getOpcode()
public void setOpcode(Opcode opcode)
opcode - the new opcodepublic java.lang.String getOpcodeString()
public void setOpcodeString(java.lang.String t)
t - the new opcode stringpublic java.lang.String getFilename()
public int getLineNumber()
public java.lang.String getError()
public void setError(java.lang.String error)
error - the error stringpublic java.lang.String getErrorDescription()
public java.util.Map<java.lang.String,OpcodeParameterInfo> getOpcodeParamInfo()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||