org.test4j.datafilling.filler
类 PoJoFiller

java.lang.Object
  继承者 org.test4j.datafilling.Filler
      继承者 org.test4j.datafilling.filler.PoJoFiller
直接已知子类:
ConstructorFiller, FactoryMethodFiller, SetterMethodFiller

public class PoJoFiller
extends Filler

PoJo对象填充器

作者:
darui.wudr

字段摘要
 
从类 org.test4j.datafilling.Filler 继承的字段
argsTypeMap, strategy
 
构造方法摘要
PoJoFiller(DataFactory strategy, Map<String,Type> argsTypeMap)
           
 
方法摘要
<T> T
fillingPoJo(AttributeInfo pojoAttr, int depth)
          Generic method which returns an instance of the given class filled with dummy values
 Object fillingWithConstructorsOrFactory(AttributeInfo attrinbuteInfo)
          It attempts to create an instance of the given class
使用工厂方法创建实例对象 This method attempts to create an instance of the given argument for classes without setters.
 
从类 org.test4j.datafilling.Filler 继承的方法
filling, filling, filling, filling, filling, fillingAttribute, returnAttributeDataStrategyValue
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

PoJoFiller

public PoJoFiller(DataFactory strategy,
                  Map<String,Type> argsTypeMap)
方法详细信息

fillingPoJo

public <T> T fillingPoJo(AttributeInfo pojoAttr,
                         int depth)
              throws PoJoFillException
Generic method which returns an instance of the given class filled with dummy values

参数:
pojoAttr - The generic type arguments for the current generic class instance
depth - How many times dtoClass has been found
返回:
An instance of filled with dummy values
抛出:
PoJoFillException - if a problem occurred while creating a POJO instance or while setting its state

fillingWithConstructorsOrFactory

public Object fillingWithConstructorsOrFactory(AttributeInfo attrinbuteInfo)
                                        throws Exception
It attempts to create an instance of the given class
使用工厂方法创建实例对象

This method attempts to create an instance of the given argument for classes without setters. These may be either immutable classes (e.g. with final attributes and no setters) or Java classes (e.g. belonging to the java / javax namespace).
In case the class does not provide a public, no-arg constructor (e.g. Calendar), this method attempts to find a , no-args, factory method (e.g. getInstance()) and it invokes it

参数:
clazz - The class for which a new instance is required
返回:
An instance of the given class
抛出:
Exception


Copyright © 2013. All rights reserved.