net.sf.mmm.util.value.impl
Class ComposedValueConverterImpl.TargetClass2ConverterMap

java.lang.Object
  extended by net.sf.mmm.util.collection.base.AbstractClassHierarchieMap<E>
      extended by net.sf.mmm.util.collection.base.AdvancedClassHierarchieMap<ComposedValueConverterImpl.ComposedTargetTypeConverter<?>>
          extended by net.sf.mmm.util.value.impl.ComposedValueConverterImpl.TargetClass2ConverterMap
Enclosing class:
ComposedValueConverterImpl

protected class ComposedValueConverterImpl.TargetClass2ConverterMap
extends AdvancedClassHierarchieMap<ComposedValueConverterImpl.ComposedTargetTypeConverter<?>>

This inner class is an AdvancedClassHierarchieMap for ComposedValueConverterImpl.ComposedTargetTypeConverters.


Constructor Summary
ComposedValueConverterImpl.TargetClass2ConverterMap()
          The constructor.
ComposedValueConverterImpl.TargetClass2ConverterMap(MapFactory<Map> mapFactory)
          The constructor.
 
Method Summary
protected  Class<?> getClass(ComposedValueConverterImpl.ComposedTargetTypeConverter<?> element)
          This method gets the associated type for the given element.
protected  boolean isAccepted(Class<?> type)
          This method determines whether the given type is accepted in the hierarchy.
 ComposedValueConverterImpl.ComposedTargetTypeConverter<?> put(Class<?> type, ComposedValueConverterImpl.ComposedTargetTypeConverter<?> element)
          This method registers the given element for the given type.
 
Methods inherited from class net.sf.mmm.util.collection.base.AdvancedClassHierarchieMap
isPreferable, put
 
Methods inherited from class net.sf.mmm.util.collection.base.AbstractClassHierarchieMap
get
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComposedValueConverterImpl.TargetClass2ConverterMap

public ComposedValueConverterImpl.TargetClass2ConverterMap()
The constructor.


ComposedValueConverterImpl.TargetClass2ConverterMap

public ComposedValueConverterImpl.TargetClass2ConverterMap(MapFactory<Map> mapFactory)
The constructor.

Parameters:
mapFactory - is the factory used to create the internal Map.
Method Detail

getClass

protected Class<?> getClass(ComposedValueConverterImpl.ComposedTargetTypeConverter<?> element)
This method gets the associated type for the given element.

Specified by:
getClass in class AdvancedClassHierarchieMap<ComposedValueConverterImpl.ComposedTargetTypeConverter<?>>
Parameters:
element - is the element for which the type is requested.
Returns:
the Class of the given element.

put

public ComposedValueConverterImpl.ComposedTargetTypeConverter<?> put(Class<?> type,
                                                                     ComposedValueConverterImpl.ComposedTargetTypeConverter<?> element)
This method registers the given element for the given type. Unlike a regular Map this method will also recursively put the given element for all super-classes and super-interfaces of the given type.

Overrides:
put in class AbstractClassHierarchieMap<ComposedValueConverterImpl.ComposedTargetTypeConverter<?>>
Parameters:
type - is the Class used as key to associate the given element.
element - is the element to put.
Returns:
the element that was associated directly with the given type and has NOW been replaced with element.
See Also:
Map.put(Object, Object)

isAccepted

protected boolean isAccepted(Class<?> type)
This method determines whether the given type is accepted in the hierarchy.
This implementation accepts any type. Override this method to ignore specific types (e.g. marker-interfaces).

Overrides:
isAccepted in class AbstractClassHierarchieMap<ComposedValueConverterImpl.ComposedTargetTypeConverter<?>>
Parameters:
type - is the Class reflecting the type to check.
Returns:
true if the given type should be accepted, false to ignore type.


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