|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.croesch.micro_debug.commons.AbstractCodeContainer
public abstract class AbstractCodeContainer
Represents a code container that is e.g. able to print the code.
| Constructor Summary | |
|---|---|
AbstractCodeContainer()
|
|
| Method Summary | |
|---|---|
protected String |
formatIntToHex(int number,
int width)
Formats the given number to a hexadecimal number and returns an right aligned string with the given width. |
protected abstract int |
getFirstPossibleCodeAddress()
Returns the address where the first possible code is stored. |
protected abstract int |
getLastPossibleCodeAddress()
Returns the address where the last possible code is stored. |
void |
printCode()
Prints the whole code to the user. |
void |
printCode(int pos1,
int pos2)
Prints the code between the given lines to the user. |
void |
printCodeAroundLine(int line,
int scope)
Prints the given number lines of code around the given line to the user. |
protected abstract int |
printCodeLine(int line)
Prints the line with the given number to the user. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractCodeContainer()
| Method Detail |
|---|
public final void printCode()
public final void printCodeAroundLine(int line,
int scope)
line - the line around to print the codescope - the number of lines to print before and after the given line
public final void printCode(int pos1,
int pos2)
pos1 - the first line to printpos2 - the last line to printprotected abstract int getFirstPossibleCodeAddress()
protected abstract int getLastPossibleCodeAddress()
protected abstract int printCodeLine(int line)
line - the line number of the code instruction to print
protected final String formatIntToHex(int number,
int width)
number - the number to formatwidth - the width the formatted string should at least have
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||