net.sf.morph.transform.copiers
Class DisassemblerCopier

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.DisassemblerCopier
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 DisassemblerCopier
extends AssemblyCopierSupport
implements DecoratedCopier, DecoratedConverter

A copier that copies a source to multiple destination objects, implementing a "Disassembler."

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

Nested Class Summary
static class DisassemblerCopier.Disassembly
          Adds the index to the source object to pass to the classConverter;
 
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
DisassemblerCopier()
          Create a new DisassemblerCopier.
DisassemblerCopier(java.lang.Object[] components)
          Create a new DisassemblerCopier.
 
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.
 Converter getClassConverter()
          Get the Converter used to convert a Disassembly object to a destination class.
protected  java.lang.Class[] getDestinationClassesImpl()
          Transformer.getDestinationClasses() implementation template method.
protected  java.lang.Class[] getSourceClassesImpl()
          Transformer.getSourceClasses() implementation template method.
 void setClassConverter(Converter classConverter)
          Set the classConverter used to convert a Disassembly object to a destination class.
 
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

DisassemblerCopier

public DisassemblerCopier()
Create a new DisassemblerCopier.


DisassemblerCopier

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

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()

getClassConverter

public Converter getClassConverter()
Get the Converter used to convert a Disassembly object to a destination class.

Returns:
the classConverter

setClassConverter

public void setClassConverter(Converter classConverter)
Set the classConverter used to convert a Disassembly object to a destination class.

Parameters:
classConverter - the classConverter to set


Copyright © 2004-2008.