it.avutils.jmapper.conversions.explicit
Class ConversionHandler

java.lang.Object
  extended by it.avutils.jmapper.conversions.explicit.ConversionHandler

public class ConversionHandler
extends Object

Conversion Handler transforms the defined conversion method in the final method, which will become a part of the mapping.

Author:
Alessandro Vurro

Constructor Summary
ConversionHandler(XML xml, Class<?> destinationClass, Class<?> sourceClass)
          Default constructor.
 
Method Summary
 ConversionHandler analyze(ConversionMethod method)
          ConversionMethod found.
 ConversionHandler belongTo(Membership membership)
          Definition of the conversion method location.
 ConversionHandler from(Field field)
          Source field definition.
 Membership getMembership()
          Get the conversion method membership.
 Method loadMethod()
          Loads the method to generate.
 ConversionHandler to(Field field)
          Destination field definition.
 boolean toBeCreated()
           
 ConversionHandler withThisConfiguration(ConfigurationType configurationType)
          ConfigurationType definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversionHandler

public ConversionHandler(XML xml,
                         Class<?> destinationClass,
                         Class<?> sourceClass)
Default constructor.

Method Detail

toBeCreated

public boolean toBeCreated()
Returns:
true if the method is to be created, false otherwise

loadMethod

public Method loadMethod()
Loads the method to generate.

Returns:
the method to generate

analyze

public ConversionHandler analyze(ConversionMethod method)
ConversionMethod found.

Parameters:
method - conversion method found
Returns:
this instance of ConversionHandler

belongTo

public ConversionHandler belongTo(Membership membership)
Definition of the conversion method location.

Parameters:
membership -
Returns:
this instance of ConversionHandler

withThisConfiguration

public ConversionHandler withThisConfiguration(ConfigurationType configurationType)
ConfigurationType definition.

Parameters:
configurationType - configuration type
Returns:
this instance of ConversionHandler

from

public ConversionHandler from(Field field)
Source field definition.

Parameters:
field - source field
Returns:
this instance of ConversionHandler

to

public ConversionHandler to(Field field)
Destination field definition.

Parameters:
field - destination field
Returns:
this instance of ConversionHandler

getMembership

public Membership getMembership()
Get the conversion method membership.

Returns:
membership


Copyright © 2013. All Rights Reserved.