|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.utils.NameMangler
construct valid names, i.e. without spaces or tabs. Also used to encode/decode Unicode escapes like '?'.
Constructor Summary | |
NameMangler()
|
Method Summary | |
static java.lang.String |
decodeUnicodeEscapes(java.lang.String src)
parse String src and replace all Unicode escapes ' ' to '?' with the corresponding Unicode characters. |
static java.lang.String |
encodeWithUnicodeEscapes(java.lang.String src)
take String src and replace non-standard characters with Unicode escapes of the form ' ' to '?'. |
static java.lang.String |
getBindkey(java.lang.Object sobj,
java.lang.String s)
utility method to parse the input string and convert to a 'bindkey' String for the given SimObject. |
static java.lang.String |
getUnicodeEscape(char c)
|
static java.lang.String |
getValidName(java.lang.String name)
|
static boolean |
isAsciiLetterOrDigitOrSomething(char c)
check whether character c is an ASCII letter (a-z, A-Z), digit (0-9), or '-', '_', ':'. |
static void |
main(java.lang.String[] argv)
main: encode and decode strings or run a simple selftest |
static void |
selftest()
|
static void |
usage()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NameMangler()
Method Detail |
public static java.lang.String getValidName(java.lang.String name)
public static boolean isAsciiLetterOrDigitOrSomething(char c)
public static java.lang.String getUnicodeEscape(char c)
public static java.lang.String encodeWithUnicodeEscapes(java.lang.String src)
#see isAsciiLetterOrDigitOrSomething for the conversion rules
public static java.lang.String decodeUnicodeEscapes(java.lang.String src)
This method may fail on strings that are not Unicode escaped, e.g. Strings which contain a backslash as their last character.
public static java.lang.String getBindkey(java.lang.Object sobj, java.lang.String s)
public static void usage()
public static void main(java.lang.String[] argv)
public static void selftest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |