net.sf.morph.transform.copiers
Class AssemblerCopier

java.lang.Object
  extended by net.sf.morph.transform.transformers.BaseTransformer
      extended by net.sf.morph.transform.transformers.BaseCompositeTransformer
          extended by net.sf.morph.transform.copiers.AssemblyCopierSupport
              extended by net.sf.morph.transform.copiers.AssemblerCopier
All Implemented Interfaces:
net.sf.composite.Component, net.sf.composite.Composite, net.sf.composite.SimpleComposite, net.sf.composite.StrictlyTypedComposite, Converter, Copier, DecoratedConverter, DecoratedCopier, DecoratedTransformer, ExplicitTransformer, Transformer

public class AssemblerCopier
extends AssemblyCopierSupport
implements DecoratedCopier, DecoratedConverter

A copier that copies multiple source objects to a single destination object, implementing an "Assembler."

Since:
Morph 1.1
Author:
Matt Benson
See Also:
http://www.martinfowler.com/eaaCatalog/dataTransferObject.html

Field Summary
 
Fields inherited from class net.sf.morph.transform.copiers.AssemblyCopierSupport
DEFAULT_VALIDATOR
 
Fields inherited from class net.sf.morph.transform.transformers.BaseCompositeTransformer
components
 
Fields inherited from class net.sf.morph.transform.transformers.BaseTransformer
destinationClasses, log, sourceClasses
 
Fields inherited from interface net.sf.morph.transform.Transformer
TRANSFORMATION_TYPE_CONVERT, TRANSFORMATION_TYPE_COPY
 
Fields inherited from interface net.sf.morph.transform.Transformer
TRANSFORMATION_TYPE_CONVERT, TRANSFORMATION_TYPE_COPY
 
Fields inherited from interface net.sf.morph.transform.Transformer
TRANSFORMATION_TYPE_CONVERT, TRANSFORMATION_TYPE_COPY
 
Fields inherited from interface net.sf.morph.transform.Transformer
TRANSFORMATION_TYPE_CONVERT, TRANSFORMATION_TYPE_COPY
 
Constructor Summary
AssemblerCopier()
          Create a new AssemblerCopier.
AssemblerCopier(java.lang.Object[] components)
          Create a new AssemblerCopier.
 
Method Summary
protected  void copyImpl(java.lang.Object destination, java.lang.Object source, java.util.Locale locale, java.lang.Integer preferredTransformationType)
          Implementation of the copy method.
protected  java.lang.Class[] getDestinationClassesImpl()
          Transformer.getDestinationClasses() implementation template method.
protected  java.lang.Class[] getSourceClassesImpl()
          Transformer.getSourceClasses() implementation template method.
 
Methods inherited from class net.sf.morph.transform.copiers.AssemblyCopierSupport
getComponentType, getContainerReflector, getCopier, getNestedTransformer, initializeImpl, setComponents, setComponentValidator, setDestinationClasses, setNestedTransformer, setSourceClasses
 
Methods inherited from class net.sf.morph.transform.transformers.BaseCompositeTransformer
getComponents, getComponentValidator, isNarrowingComponentArray, isWrappingRuntimeExceptions, updateNestedTransformerComponents
 
Methods inherited from class net.sf.morph.transform.transformers.BaseTransformer
clone, convert, convert, convertImpl, copy, copy, createDefaultReflector, createNewInstance, createNewInstanceImpl, createReusableSource, equals, equals, equalsUnidirectionalTest, getDestinationClasses, getInstantiatingReflector, getLocale, getLog, getReflector, getReflector, getSourceClasses, getTransformableCallCache, getTransformerName, initialize, isAutomaticallyHandlingNulls, isCachingIsTransformableCalls, isImpreciseTransformation, isImpreciseTransformationImpl, isInitialized, isPerformingLogging, isTransformable, isTransformableImpl, setCachingIsTransformableCalls, setInitialized, setLog, setReflector, setTransformableCallCache, setTransformerName, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.morph.transform.DecoratedCopier
copy
 
Methods inherited from interface net.sf.morph.transform.Copier
copy
 
Methods inherited from interface net.sf.morph.transform.Transformer
getDestinationClasses, getSourceClasses
 
Methods inherited from interface net.sf.morph.transform.Transformer
getDestinationClasses, getSourceClasses
 
Methods inherited from interface net.sf.morph.transform.ExplicitTransformer
isTransformable
 
Methods inherited from interface net.sf.morph.transform.DecoratedConverter
convert, equals, equals
 
Methods inherited from interface net.sf.morph.transform.Converter
convert
 
Methods inherited from interface net.sf.morph.transform.Transformer
getDestinationClasses, getSourceClasses
 
Methods inherited from interface net.sf.morph.transform.Transformer
getDestinationClasses, getSourceClasses
 
Methods inherited from interface net.sf.morph.transform.ExplicitTransformer
isTransformable
 

Constructor Detail

AssemblerCopier

public AssemblerCopier()
Create a new AssemblerCopier.


AssemblerCopier

public AssemblerCopier(java.lang.Object[] components)
Create a new AssemblerCopier.

Parameters:
components -
Method Detail

copyImpl

protected void copyImpl(java.lang.Object destination,
                        java.lang.Object source,
                        java.util.Locale locale,
                        java.lang.Integer preferredTransformationType)
                 throws java.lang.Exception
Implementation of the copy method. By default, this method throws UnsupportedOperationException.

Overrides:
copyImpl in class BaseTransformer
Throws:
java.lang.Exception
See Also:
BaseTransformer.copyImpl(java.lang.Object, java.lang.Object, java.util.Locale, java.lang.Integer)

getSourceClassesImpl

protected java.lang.Class[] getSourceClassesImpl()
                                          throws java.lang.Exception
Transformer.getSourceClasses() implementation template method.

Specified by:
getSourceClassesImpl in class BaseTransformer
Returns:
Class[]
Throws:
java.lang.Exception
See Also:
BaseTransformer.getSourceClassesImpl()

getDestinationClassesImpl

protected java.lang.Class[] getDestinationClassesImpl()
                                               throws java.lang.Exception
Transformer.getDestinationClasses() implementation template method.

Specified by:
getDestinationClassesImpl in class BaseTransformer
Returns:
Class[]
Throws:
java.lang.Exception
See Also:
BaseTransformer.getDestinationClassesImpl()


Copyright © 2004-2008.