Spring Web Flow

org.springframework.binding.mapping.impl
Class DefaultMapper

java.lang.Object
  extended by org.springframework.binding.mapping.impl.DefaultMapper
All Implemented Interfaces:
Mapper

public class DefaultMapper
extends java.lang.Object
implements Mapper

Generic mapper implementation that allows mappings to be configured programatically.

Author:
Keith Donald
See Also:
addMapping(DefaultMapping)

Constructor Summary
DefaultMapper()
           
 
Method Summary
 DefaultMapper addMapping(DefaultMapping mapping)
          Add a mapping to this mapper.
 Mapping[] getMappings()
          Returns this mapper's list of mappings.
 MappingResults map(java.lang.Object source, java.lang.Object target)
          Map state from a source object to a target object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultMapper

public DefaultMapper()
Method Detail

addMapping

public DefaultMapper addMapping(DefaultMapping mapping)
Add a mapping to this mapper.

Parameters:
mapping - the mapping to add (required)
Returns:
this, to support convenient call chaining

getMappings

public Mapping[] getMappings()
Returns this mapper's list of mappings.

Returns:
the list of mappings

map

public MappingResults map(java.lang.Object source,
                          java.lang.Object target)
Description copied from interface: Mapper
Map state from a source object to a target object.

Specified by:
map in interface Mapper
Parameters:
source - the source
target - the target
Returns:
results of the mapping transaction

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Web Flow