ARRAY
- is the generic type of the array as target-type
.public abstract class AbstractConverterToArray<ARRAY> extends AbstractValueConverterToContainer<ARRAY>
ValueConverter
interface that converts an
Object
to an array. ValueConverter
ELEMENT_ESCAPE_END, ELEMENT_ESCAPE_START, ELEMENT_SEPARATOR
Constructor and Description |
---|
AbstractConverterToArray()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
convertContainerEntry(Object element,
int index,
ARRAY container,
Object valueSource,
GenericType<? extends ARRAY> targetType,
Object value)
This method converts a single entry of a container.
|
protected <T extends ARRAY> |
createContainer(GenericType<T> targetType,
int length)
This method creates the according container for the given
containerType . |
protected void |
doInitialize()
This method performs the actual
initialization . |
convert, convertFromArray, convertFromCollection, convertFromString, getCollectionReflectionUtil, getSourceType, setCollectionReflectionUtil
getComposedValueConverter, setComposedValueConverter
convert, getReflectionUtil, setReflectionUtil
createLogger, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTargetType
protected void doInitialize()
AbstractComponent
initialization
. It is called when AbstractComponent.initialize()
is
invoked for the first time. super.
AbstractComponent.doInitialize()
.doInitialize
in class AbstractValueConverterToContainer<ARRAY>
protected void convertContainerEntry(Object element, int index, ARRAY container, Object valueSource, GenericType<? extends ARRAY> targetType, Object value)
AbstractValueConverterToContainer
convertContainerEntry
in class AbstractValueConverterToContainer<ARRAY>
element
- is the single entry (element) of the container to convert.index
- is the index of the given element
in the order of occurrence.container
- is the current container where to add the given element
as entry.valueSource
- describes the source of the value or null
if NOT available.targetType
- is the target-type
to convert to.value
- is the original value to convert.protected <T extends ARRAY> T createContainer(GenericType<T> targetType, int length)
AbstractValueConverterToContainer
containerType
.createContainer
in class AbstractValueConverterToContainer<ARRAY>
T
- is the generic type of targetType
.targetType
- is the GenericType
of the container.length
- is the length (or capacity) of the container to create.Copyright © 2001–2016 mmm-Team. All rights reserved.