ca.quine.jcommons.sourceexporter
Class CollectionMarshaller
java.lang.Object
|
+--ca.quine.jcommons.sourceexporter.SourceMarshaller
|
+--ca.quine.jcommons.sourceexporter.CollectionMarshaller
- Direct Known Subclasses:
- ArrayMarshaller, ListMarshaller, MapMarshaller, SetMarshaller
- public abstract class CollectionMarshaller
- extends SourceMarshaller
The superclass of all marshallers that marshal a Collection
(or array) of Objects. To write your own collection marshaller, see
the source code for ListMarshaller
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CollectionMarshaller
public CollectionMarshaller()
doesMarshal
public abstract boolean doesMarshal(Object object)
- Specified by:
doesMarshal
in class SourceMarshaller
marshal
public String marshal(ChainOfResponsibility chainOfResponsibility,
MarshallingContext context,
ClassSource classSource,
Object object,
boolean marshalAsObject)
throws IOException,
IllegalArgumentException,
IllegalAccessException,
InvocationTargetException,
InstantiationException,
ClassNotFoundException
- Specified by:
marshal
in class SourceMarshaller
IOException
IllegalArgumentException
IllegalAccessException
InvocationTargetException
InstantiationException
ClassNotFoundException
convertTypeToSimpleType
public String convertTypeToSimpleType(Class clazz)
arrayDimension
protected int arrayDimension(Class clazz)
convertTypeToSourceCodeType
public String convertTypeToSourceCodeType(Class clazz)
initialCap
public String initialCap(String input)
convertClassToInitializer
protected String convertClassToInitializer(Object object)
arrayType
protected Class arrayType(Class clazz)
addItemsToReturnValue
protected abstract void addItemsToReturnValue(ChainOfResponsibility chainOfResponsibility,
MarshallingContext context,
ClassSource classSource,
Object object,
ArrayList codeLines)
throws IOException,
IllegalAccessException,
InvocationTargetException,
ClassNotFoundException,
InstantiationException
IOException
IllegalAccessException
InvocationTargetException
ClassNotFoundException
InstantiationException