|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.gjsa.Str2ObjParser
Parser for a string representated object into its internal object representation. The parser knows about parsing the built-in object types and is extendable through additional parsers in external objects (kind of a plug-in mechanism).
The class consists only of static methods and is non-instaniable (only constructor is private).
String representation of objects follows a certain scheme: <Object-ID> "(" <internal values> ")". The GJSA-classes ServerReply, ServerRequest and ServerEnvelope can be handled differently offering a more convenient syntax through some special methods of this class.
Str2ObjParser works recursively through a tree of objects. It uses a special helper class "Str2ObjParamParser" which handles the parsing of one object and calls a new instance of itself on objects contained in its "own" object.
ClassParser
,
Str2ObjParamParser
,
Obj2StrParser
Field Summary | |
static java.util.List |
classparserID
Description of the Field |
static java.util.List |
classparsers
Description of the Field |
private static Logger |
mess
|
Constructor Summary | |
private |
Str2ObjParser()
This object is static-only and is not instanciable. |
Method Summary | |
static void |
addClassParser(ClassParser cp)
Add an external ClassParser class which may parse objects of one or more classes. |
static java.lang.Object |
createObject(java.lang.String il)
Caller method for parsing an object through a Str2ObjParamParser |
static ServerEnvelope |
createReplyEnvelope(java.lang.String il)
Parses a complete reply in special syntax. |
static ServerEnvelope |
createRequestEnvelope(java.lang.String il)
Parse a complete request in special syntax. |
protected static int |
findNextSemicolon(java.lang.String line,
int i)
Find next semicolon from position i on. |
protected static ServerReply |
getReply(java.lang.String line)
Parse a single reply in special syntax |
protected static ServerRequest |
getRequest(java.lang.String line)
Returns a single ServerRequest in special syntax: <command> <parameter>... |
static void |
setLogger(Logger m)
Set a Logger so that the Parser may log things. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static Logger mess
public static java.util.List classparserID
public static java.util.List classparsers
Constructor Detail |
private Str2ObjParser()
Method Detail |
public static void setLogger(Logger m)
m
- The new logger valueLogger
public static void addClassParser(ClassParser cp)
cp
- The feature to be added to the ClassParser attributeClassParser
protected static int findNextSemicolon(java.lang.String line, int i)
line
- Description of the Parameteri
- Description of the Parameter
protected static ServerRequest getRequest(java.lang.String line)
line
- Description of the Parameter
protected static ServerReply getReply(java.lang.String line)
line
- Description of the Parameter
public static java.lang.Object createObject(java.lang.String il)
il
- Description of the Parameter
Str2ObjParamParser
public static ServerEnvelope createRequestEnvelope(java.lang.String il)
il
- Description of the Parameter
public static ServerEnvelope createReplyEnvelope(java.lang.String il)
il
- Description of the Parameter
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |