|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.morph.transform.transformers.BaseTransformer net.sf.morph.transform.transformers.BaseCompositeTransformer net.sf.morph.transform.copiers.AssemblyCopierSupport
public abstract class AssemblyCopierSupport
Support for AssemblerCopier/DisassemblerCopier.
http://www.martinfowler.com/eaaCatalog/dataTransferObject.html
Field Summary | |
---|---|
protected static net.sf.composite.validate.ComponentValidator |
DEFAULT_VALIDATOR
Default ComponentValidator; ignores empty component list |
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 |
Constructor Summary | |
---|---|
protected |
AssemblyCopierSupport()
Create a new AssemblyCopierSupport. |
protected |
AssemblyCopierSupport(java.lang.Object[] components)
Create a new AssemblyCopierSupport. |
Method Summary | |
---|---|
java.lang.Class |
getComponentType()
Return the component type of this transformer. |
protected ContainerReflector |
getContainerReflector()
Get the ContainerReflector used by this Transformer. |
protected Copier |
getCopier(int index)
Get the Copier that will perform the copy for index index . |
Transformer |
getNestedTransformer()
Get the transformer (Copier) which, in the absence of a components list, will be used to perform nested transformations. |
protected void |
initializeImpl()
Gives subclasses a chance to perform any computations needed to initialize the transformer. |
void |
setComponents(java.lang.Object[] components)
|
void |
setComponentValidator(net.sf.composite.validate.ComponentValidator componentValidator)
Set the ComponentValidator for this transformer. |
void |
setDestinationClasses(java.lang.Class[] destinationClasses)
Configures the destinationClasses property of this
transformer. |
void |
setNestedTransformer(Transformer nestedTransformer)
Set the transformer (Copier) which, in the absence of a components list, will be used to perform nested transformations. |
void |
setSourceClasses(java.lang.Class[] sourceClasses)
Configures the sourceClasses property of this transformer. |
Methods inherited from class net.sf.morph.transform.transformers.BaseCompositeTransformer |
---|
getComponents, getComponentValidator, isNarrowingComponentArray, isWrappingRuntimeExceptions, updateNestedTransformerComponents |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.morph.transform.Transformer |
---|
getDestinationClasses, getSourceClasses |
Field Detail |
---|
protected static final net.sf.composite.validate.ComponentValidator DEFAULT_VALIDATOR
Constructor Detail |
---|
protected AssemblyCopierSupport()
protected AssemblyCopierSupport(java.lang.Object[] components)
components
- Method Detail |
---|
protected void initializeImpl() throws java.lang.Exception
initializeImpl
in class BaseCompositeTransformer
java.lang.Exception
BaseTransformer.initializeImpl()
public java.lang.Class getComponentType()
getComponentType
in interface net.sf.composite.StrictlyTypedComposite
getComponentType
in class BaseCompositeTransformer
BaseCompositeTransformer.getComponentType()
public void setSourceClasses(java.lang.Class[] sourceClasses)
sourceClasses
property of this transformer.
Note that this method should be called before the transformer is used.
Otherwise, if another thread is in the middle of transforming an object
graph and this method is called, the behavior of the transformer can
change partway through the transformation.
setSourceClasses
in class BaseTransformer
sourceClasses
- the new sourceClasses
for this transformerBaseTransformer.setSourceClasses(java.lang.Class[])
public void setDestinationClasses(java.lang.Class[] destinationClasses)
destinationClasses
property of this
transformer. Note that this method should be called before the
transformer is used. Otherwise, if another thread is in the middle of
transforming an object graph and this method is called, the behavior of
the transformer can change partway through the transformation.
setDestinationClasses
in class BaseTransformer
destinationClasses
- the new destinationClasses
for this transformerBaseTransformer.setDestinationClasses(java.lang.Class[])
protected ContainerReflector getContainerReflector()
public void setNestedTransformer(Transformer nestedTransformer)
setNestedTransformer
in class BaseCompositeTransformer
nestedTransformer
- the transformer used to perform nested transformationspublic Transformer getNestedTransformer()
getNestedTransformer
in class BaseTransformer
protected Copier getCopier(int index)
index
.
index
-
public void setComponents(java.lang.Object[] components)
setComponents
in interface net.sf.composite.SimpleComposite
setComponents
in class BaseCompositeTransformer
BaseCompositeTransformer.setComponents(java.lang.Object[])
public void setComponentValidator(net.sf.composite.validate.ComponentValidator componentValidator)
setComponentValidator
in class BaseCompositeTransformer
componentValidator
- ComponentValidatorBaseCompositeTransformer.setComponentValidator(net.sf.composite.validate.ComponentValidator)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |