jTransfo, 0.14

org.jtransfo.internal
Class ConvertInterceptorChainPiece

java.lang.Object
  extended by org.jtransfo.internal.ConvertInterceptorChainPiece
All Implemented Interfaces:
ConvertSourceTarget

public class ConvertInterceptorChainPiece
extends Object
implements ConvertSourceTarget

A piece of the chain with convert interceptors.


Constructor Summary
ConvertInterceptorChainPiece(ConvertInterceptor interceptor, ConvertSourceTarget next)
          Constructor.
 
Method Summary
<T> T
convert(Object source, T target, boolean isTargetTo, String... tags)
          Fill the target object with the values from the source object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertInterceptorChainPiece

public ConvertInterceptorChainPiece(ConvertInterceptor interceptor,
                                    ConvertSourceTarget next)
Constructor.

Parameters:
interceptor - actual interceptor for this piece of the chain
next - next piece of the chain
Method Detail

convert

public <T> T convert(Object source,
                     T target,
                     boolean isTargetTo,
                     String... tags)
Description copied from interface: ConvertSourceTarget
Fill the target object with the values from the source object.

This will write all values from the transfer object, other fields are not touched.

Specified by:
convert in interface ConvertSourceTarget
Type Parameters:
T - type of object for target
Parameters:
source - source object. Should not be null.
target - target object. Should not be null.
isTargetTo - is the target class the transfer object?
tags - tags which indicate which fields can be converted based on MapOnly annotations. Tags are processed from left to right.
Returns:
target object

jTransfo, 0.14

Copyright © 2014. All rights reserved.