|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.wurbelizer.ArgScanner
public class ArgScanner
Utility class to scan for arguments and to do variable translation.
Arguments usually are separated by whitespaces. However, sometimes arguments must include whitespaces, i.e. must be quoted. There are two kinds quotes:
double-quotes like @{code "test: $remote == --remote"}. The $remote will be translated. A single-quote in a double-quoted string is allowed.
single-quotes like @{code --orderby='" ORDER BY " + FIELD_ID + " DESC"'}. No translation will take place and such args may contain double-quotes.
Double-quotes in a double-quoted string must be quoted with a backslash. Same is true for single-quotes in a single quoted string. A backslash is written as \\.
Notice that variable translation takes place after the arguments have been separated. Thus, a variable may contain quotes and these quotes need not be escaped.
| Constructor Summary | |
|---|---|
ArgScanner(String str,
Properties otherProps)
Creates an instance of an arg scanner. |
|
| Method Summary | |
|---|---|
String |
next()
Gets the next argument. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArgScanner(String str,
Properties otherProps)
str - the text containing the argsotherProps - extra properties if != null, else default properties only.| Method Detail |
|---|
public String next()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||