QJCC homepage

biz.chitec.quarterback.gjsa
Class ClassParsers.GenericListCP

java.lang.Object
  extended bybiz.chitec.quarterback.gjsa.ClassParsers.GenericListCP
All Implemented Interfaces:
ClassParser
Direct Known Subclasses:
ClassParsers.ArrayListCP, ClassParsers.LinkedListCP
Enclosing class:
ClassParsers

public abstract static class ClassParsers.GenericListCP
extends java.lang.Object
implements ClassParser

Generic abstract parser for lists. Defines two helper methods which are accessed by the normal parsing methods. Those two must be overridden to implement parsers for different ancestors of "List".


Constructor Summary
ClassParsers.GenericListCP()
           
 
Method Summary
protected abstract  java.util.List createEmptyList()
          Create an empty list of appropriate type
protected abstract  java.util.List obj2List(java.lang.Object o)
          Convert a given object into the List of the appropriate type.
 java.lang.String obj2Str(java.lang.Object obj)
          This method should convert a given object into a string representation.
 java.lang.Object str2Obj(Str2ObjParamParser sopp)
          Converts a string representation into a Java object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface biz.chitec.quarterback.gjsa.ClassParser
getID
 

Constructor Detail

ClassParsers.GenericListCP

public ClassParsers.GenericListCP()
Method Detail

obj2List

protected abstract java.util.List obj2List(java.lang.Object o)
Convert a given object into the List of the appropriate type.

Parameters:
o - Object given to Obj2StrParser
Returns:
Subtype of List. Null, if given object is no List

createEmptyList

protected abstract java.util.List createEmptyList()
Create an empty list of appropriate type

Returns:
List of appropriate type for the actual parser

obj2Str

public java.lang.String obj2Str(java.lang.Object obj)
Description copied from interface: ClassParser
This method should convert a given object into a string representation. It must retrun null if the object cannot be handled by this parser. Otherwise, it must return only the internal values of the object.

Specified by:
obj2Str in interface ClassParser
Parameters:
obj - Description of the Parameter
Returns:
Description of the Return Value

str2Obj

public java.lang.Object str2Obj(Str2ObjParamParser sopp)
Description copied from interface: ClassParser
Converts a string representation into a Java object. This method needs to create an object of its class and fill it with the values that are given through the Str2ObjParamParser. The ClassParser may use all of Str2ObjParamParser's internal methods, esp. parseObject() which may enter a recursive step.

Specified by:
str2Obj in interface ClassParser
Parameters:
sopp - Description of the Parameter
Returns:
Description of the Return Value

QJCC homepage