public class ArgString extends Object
ArgString#parseStringLiteral(java.lang.StringBuilder)
.| Constructor and Description |
|---|
ArgString(String string)
Take the string and use it as the value of the argument.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
T |
getValue() |
protected static Character |
parseStringCharacter(StringBuilder sb)
Extract the StringCharacter from the sb and return it.
|
protected static String |
parseStringLiteral(String escaped)
Take the escaped string, parse it and return the unescaped value.
|
static String |
unescape(String escapedString)
Get unescaped version of passed string.
|
public ArgString(String string)
unescape(java.lang.String) is
recommended (it parses escaped string into an unescaped form).string - value of the argumentpublic static String unescape(String escapedString) throws ParseException
escapedString - string escaped according to java lexical structure,
without double quotes (e.g. Hello\nWorld)ParseException - if there is an error in the escapingprotected static String parseStringLiteral(String escaped) throws ParseException
string - string to parse, incl. quotes (e.g. "Foo\nBar")
StringLiteral: " [StringCharacters] "ParseExceptionprotected static Character parseStringCharacter(StringBuilder sb) throws ParseException
\(u)+ [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] ~ Unicode char \[btnfr"'\] \[0-3][0-7][0-7] \[0-7][0-7] \[0-7]
sb - sequence of chars that is used to extract the character. Is
modified (characters are removed) during parsing.ParseExceptionCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.