|
Language Processing v2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectUtils
public abstract class Utils
useful functions for parsers.
| Field Summary | |
|---|---|
protected boolean |
error
true if there was an error. |
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static String |
className(Object o)
return simplified class name. |
protected void |
error(int position,
String message)
writes error message with (nonzero) position. |
protected void |
error(Parser.Node node,
String message)
writes error message with (nonzero) position from node. |
protected void |
error(String message)
writes error message, sets error. |
static String |
fromString(String s)
return internal representation of the characters of an external string. |
boolean |
getError()
|
protected void |
message(String message)
should be overwritten to redirect all messages. |
static String |
toChars(Object o)
return external representation of the characters of a string. |
static String |
toString(String s,
char delim)
return external representation of a string (enclosed in quotes). |
protected void |
warning(int position,
String message)
writes warning message with (nonzero) position. |
protected void |
warning(Parser.Node node,
String message)
writes warning message with (nonzero) position from node. |
protected void |
warning(String message)
writes warning message. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean error
error(java.lang.String)| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public boolean getError()
public static String toString(String s,
char delim)
delim - single or double quote to surround the result.public static String toChars(Object o)
public static String fromString(String s)
public static String className(Object o)
protected void message(String message)
protected void error(String message)
error.
message(java.lang.String)
protected void error(int position,
String message)
protected void error(Parser.Node node,
String message)
protected void warning(String message)
message(java.lang.String)
protected void warning(int position,
String message)
protected void warning(Parser.Node node,
String message)
|
(c) 2008 Axel T. Schreiner |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||