it.avutils.jmapper.dsl
Class MapperBuilder

java.lang.Object
  extended by it.avutils.jmapper.dsl.MapperBuilder

public class MapperBuilder
extends Object

MapperBuilder increases the readability of the code to retrieve the parameters necessary to create or find a new IMapper class.
For example:

from(source).to(destination)
     .analyzing(config)
     .presentIn(xmlPath)

Author:
Alessandro Vurro

Method Summary
 MapperBuilder analyzing(ChooseConfig config)
          This method set the config instance variable.
 boolean exist()
           
static MapperBuilder from(Class<?> source)
          Starting point for parameters setting.
<D,S> Class<IMapper<D,S>>
generate()
           
<D,S> Class<IMapper<D,S>>
get()
           
 MapperBuilder presentIn(String xmlPath)
          This method set the xmlPath instance variable.
 MapperBuilder to(Class<?> destination)
          This method set the destination instance variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

exist

public boolean exist()
Returns:
true if the mapper class exists, false otherwise

get

public <D,S> Class<IMapper<D,S>> get()
Returns:
the existent mapper class

generate

public <D,S> Class<IMapper<D,S>> generate()
                             throws javassist.NotFoundException,
                                    Exception
Returns:
the generated mapper class
Throws:
javassist.NotFoundException
Exception

from

public static MapperBuilder from(Class<?> source)
Starting point for parameters setting. This method set the source instance variable.

Parameters:
source - source to set
Returns:
a new instance of MapperBuilder

to

public MapperBuilder to(Class<?> destination)
This method set the destination instance variable.

Parameters:
destination - destination to set
Returns:
this instance of MapperBuilder

analyzing

public MapperBuilder analyzing(ChooseConfig config)
This method set the config instance variable.

Parameters:
config - configuration to set
Returns:
this instance of MapperBuilder

presentIn

public MapperBuilder presentIn(String xmlPath)
This method set the xmlPath instance variable.

Parameters:
xmlPath - xml path to set
Returns:
this instance of MapperBuilder


Copyright © 2013. All Rights Reserved.