net.sf.mmm.util.value.base
Class AbstractRecursiveValueConverter<SOURCE,TARGET>

java.lang.Object
  extended by net.sf.mmm.util.component.base.AbstractComponent
      extended by net.sf.mmm.util.component.base.AbstractLoggableComponent
          extended by net.sf.mmm.util.value.base.AbstractValueConverter<SOURCE,TARGET>
              extended by net.sf.mmm.util.value.base.AbstractRecursiveValueConverter<SOURCE,TARGET>
Type Parameters:
SOURCE - is the generic source-type.
TARGET - is the generic target-type.
All Implemented Interfaces:
SimpleValueConverter<SOURCE,TARGET>, ValueConverter<SOURCE,TARGET>
Direct Known Subclasses:
AbstractValueConverterToContainer, ValueConverterToCompatiblePojo

public abstract class AbstractRecursiveValueConverter<SOURCE,TARGET>
extends AbstractValueConverter<SOURCE,TARGET>

This is an abstract base-implementation for a ValueConverter that performs recursive conversions on the owning-converter for converting child values.

Since:
1.0.1
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private  ComposedValueConverter composedValueConverter
           
 
Constructor Summary
AbstractRecursiveValueConverter()
          The constructor.
 
Method Summary
protected  void doInitialize()
          This method performs the actual initialization.
protected  ComposedValueConverter getComposedValueConverter()
          This method gets the ComposedValueConverter owing this converter.
 void setComposedValueConverter(ComposedValueConverter composedValueConverter)
          This method sets (injects) the composedValueConverter.
 
Methods inherited from class net.sf.mmm.util.value.base.AbstractValueConverter
convert, getReflectionUtil, setReflectionUtil
 
Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableComponent
getLogger, setLogger
 
Methods inherited from class net.sf.mmm.util.component.base.AbstractComponent
doInitialized, getInitializationState, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.mmm.util.value.api.ValueConverter
convert, getSourceType, getTargetType
 

Field Detail

composedValueConverter

private ComposedValueConverter composedValueConverter
See Also:
getComposedValueConverter()
Constructor Detail

AbstractRecursiveValueConverter

public AbstractRecursiveValueConverter()
The constructor.

Method Detail

getComposedValueConverter

protected ComposedValueConverter getComposedValueConverter()
This method gets the ComposedValueConverter owing this converter. It is required for recursive invocations during conversion.

Returns:
the ComposedValueConverter.

setComposedValueConverter

@Inject
public void setComposedValueConverter(ComposedValueConverter composedValueConverter)
This method sets (injects) the composedValueConverter. It has to be called before AbstractComponent.initialize() is invoked.

Parameters:
composedValueConverter - is the ComposedValueConverter to set.

doInitialize

protected void doInitialize()
This method performs the actual initialization. It is called when AbstractComponent.initialize() is invoked for the first time.
ATTENTION:
When you override this method from a sub-class you need to do a super.AbstractComponent.doInitialize().

Overrides:
doInitialize in class AbstractValueConverter<SOURCE,TARGET>


Copyright © 2001-2010 mmm-Team. All Rights Reserved.