ca.quine.jcommons.sourceexporter
Class ArrayMarshaller

java.lang.Object
  |
  +--ca.quine.jcommons.sourceexporter.SourceMarshaller
        |
        +--ca.quine.jcommons.sourceexporter.CollectionMarshaller
              |
              +--ca.quine.jcommons.sourceexporter.ArrayMarshaller

public class ArrayMarshaller
extends CollectionMarshaller

Marshalls an array of any type up to dimension 3 (with any lengths), including primitives, into source code.


Field Summary
protected  ArrayConverterFactory converterFactory
          Normally, marshallers should not have any internal state.
 
Constructor Summary
ArrayMarshaller()
           
 
Method Summary
protected  void addItemsToReturnValue(ChainOfResponsibility chainOfResponsibility, MarshallingContext context, ClassSource classSource, Object object, ArrayList codeLines)
           
 boolean doesMarshal(Object object)
          Returns true if object is an array.
 
Methods inherited from class ca.quine.jcommons.sourceexporter.CollectionMarshaller
arrayDimension, arrayType, convertClassToInitializer, convertTypeToSimpleType, convertTypeToSourceCodeType, initialCap, marshal
 
Methods inherited from class ca.quine.jcommons.sourceexporter.SourceMarshaller
createMethodSource, marshal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

converterFactory

protected ArrayConverterFactory converterFactory
Normally, marshallers should not have any internal state. However, since none of the array converters have internal state, there will not be any threading issues.

Constructor Detail

ArrayMarshaller

public ArrayMarshaller()
Method Detail

doesMarshal

public boolean doesMarshal(Object object)
Returns true if object is an array.

Specified by:
doesMarshal in class CollectionMarshaller

addItemsToReturnValue

protected void addItemsToReturnValue(ChainOfResponsibility chainOfResponsibility,
                                     MarshallingContext context,
                                     ClassSource classSource,
                                     Object object,
                                     ArrayList codeLines)
                              throws IOException,
                                     IllegalAccessException,
                                     InvocationTargetException,
                                     ClassNotFoundException,
                                     InstantiationException
Specified by:
addItemsToReturnValue in class CollectionMarshaller
IOException
IllegalAccessException
InvocationTargetException
ClassNotFoundException
InstantiationException
See Also:
CollectionMarshaller.addItemsToReturnValue(ca.quine.jcommons.sourceexporter.ChainOfResponsibility, ca.quine.jcommons.sourceexporter.MarshallingContext, ca.quine.jcommons.sourcegen.ClassSource, java.lang.Object, java.util.ArrayList)