net.sf.morph.transform.copiers
Class CombiningCopier
java.lang.Object
net.sf.morph.transform.transformers.BaseTransformer
net.sf.morph.transform.transformers.BaseReflectorTransformer
net.sf.morph.transform.copiers.CombiningCopier
- All Implemented Interfaces:
- net.sf.composite.Component, Converter, Copier, DecoratedConverter, DecoratedCopier, DecoratedTransformer, ExplicitTransformer, Transformer
public class CombiningCopier
- extends BaseReflectorTransformer
- implements DecoratedCopier, DecoratedConverter
Combines all of the contents of a container into a single container. If any
of the contents of the source container are containers themselves, the
elements are extracted and put into the destination container. Examples:
- combines an array of Lists into just a single array, with all the
elements from each List copied into the destination array
- combines [14, "hello", ["this", "is", "another", "array"], "the", "end"]
(this is a list with 5 elements, a number, a string, an array, and two more
strings) into [14, "hello", "this", "is", "another", "array", "the", "end]
(this list has 8 elements, a number and 7 strings)
UNFINISHED
- Since:
- Dec 5, 2004
- Author:
- Matt Sgarlata
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, getNestedTransformer, getReflector, getReflector, getSourceClasses, getTransformableCallCache, getTransformerName, initialize, initializeImpl, isAutomaticallyHandlingNulls, isCachingIsTransformableCalls, isImpreciseTransformation, isImpreciseTransformationImpl, isInitialized, isPerformingLogging, isTransformable, isTransformableImpl, isWrappingRuntimeExceptions, setCachingIsTransformableCalls, setDestinationClasses, setInitialized, setLog, setNestedTransformer, setReflector, setSourceClasses, 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.Copier |
copy |
CombiningCopier
public CombiningCopier()
- Create a new CombiningCopier.
copyImpl
protected void copyImpl(java.lang.Object destination,
java.lang.Object source,
java.util.Locale locale,
java.lang.Integer preferredTransformationType)
throws TransformationException
- Implementation of the copy method. By default, this method throws
UnsupportedOperationException.
- Overrides:
copyImpl
in class BaseTransformer
- Throws:
TransformationException
getSourceClassesImpl
protected java.lang.Class[] getSourceClassesImpl()
throws java.lang.Exception
Transformer.getSourceClasses()
implementation template method.
- Overrides:
getSourceClassesImpl
in class BaseReflectorTransformer
- Returns:
- Class[]
- Throws:
java.lang.Exception
getDestinationClassesImpl
protected java.lang.Class[] getDestinationClassesImpl()
throws java.lang.Exception
Transformer.getDestinationClasses()
implementation template method.
- Overrides:
getDestinationClassesImpl
in class BaseReflectorTransformer
- Returns:
- Class[]
- Throws:
java.lang.Exception
Copyright © 2004-2008.