|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttools.code.CU
public final class CU
This class contains lots of tool functions for dealing with assembly code.
| Method Summary | |
|---|---|
static java.lang.String |
collapseWhiteSpace(java.lang.String s)
This static method collapses multiple white spaces into one white space. |
static int |
findEndOfExpression(java.lang.String text,
int start)
This method locates the end of a token run. |
static int |
findEndOfSymbol(java.lang.String text,
int start)
|
static java.lang.String |
fourDigitHex(int value)
This static method returns the given value as a 4 digit hex number. |
static java.lang.String |
getDataString(int[] data)
This method produces a string of hex bytes for the given byte array. |
static boolean |
isFourDigitHex(java.lang.String s)
This method checks that the string starts with a four digit hex number. |
static boolean |
isTwoDigitHex(java.lang.String s,
int start)
This static method checks to see if there is a two-digit hex value at the given location in the target string. |
static java.lang.String |
leadingZero(java.lang.String s,
int len)
This static method pads a string with leading zeros. |
static java.lang.String |
padTo(java.lang.String s,
int len)
This static method pads the given string to the given length by appending white-space to the end. |
static int |
parseIntValue(java.lang.String s)
This method parses an integer value from the given string accounting for base specification. |
static java.lang.String |
removeWhiteSpace(java.lang.String text,
java.util.List<java.lang.Integer> starts)
This method removes unneeded whitespace in a line of code. |
static java.lang.String |
replaceAll(java.lang.String source,
java.lang.String key,
java.lang.String value)
This static method replaces all "key" in "source" with "value". |
static int |
signedNumber(int bits,
int value)
This static method converts an N-bit signed value to a true java signed value. |
static java.lang.String |
twoDigitHex(int value)
This static method returns the given value as a 2 digit hex number. |
static java.lang.String |
twoOrFourDigitHex(int value)
This static method returns the given value as a 2 digit or 4 digit hex number (4 if greater than 255). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String removeWhiteSpace(java.lang.String text,
java.util.List<java.lang.Integer> starts)
text - the input textstarts - where each character in the return string started in the original string
public static int findEndOfExpression(java.lang.String text,
int start)
text - the text to searchstart - the starting position of the token to find the end
public static int findEndOfSymbol(java.lang.String text,
int start)
public static boolean isTwoDigitHex(java.lang.String s,
int start)
s - target stringstart - starting point in the string
public static boolean isFourDigitHex(java.lang.String s)
s - the target string
public static java.lang.String fourDigitHex(int value)
value - the value to convert
public static java.lang.String twoDigitHex(int value)
value - the value to convert
public static java.lang.String twoOrFourDigitHex(int value)
value - the value to convert
public static java.lang.String replaceAll(java.lang.String source,
java.lang.String key,
java.lang.String value)
source - the string to substitute intokey - the target text to replacevalue - the text to replace with
public static java.lang.String padTo(java.lang.String s,
int len)
s - the string to padlen - the required length
public static java.lang.String leadingZero(java.lang.String s,
int len)
s - the string to padlen - the length of the string to pad to
public static java.lang.String collapseWhiteSpace(java.lang.String s)
s - the string to process
public static int signedNumber(int bits,
int value)
bits - number of bits in the valuevalue - the signed value
public static java.lang.String getDataString(int[] data)
data - the byte array
public static int parseIntValue(java.lang.String s)
s - the string to parse
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||