org.unitils.objectvalidation.objectcreator
Class ObjectCreatorMockedFieldsImpl

java.lang.Object
  extended by org.unitils.objectvalidation.objectcreator.BaseObjectCreator
      extended by org.unitils.objectvalidation.objectcreator.ObjectCreatorMockedFieldsImpl
All Implemented Interfaces:
ObjectCreator

public class ObjectCreatorMockedFieldsImpl
extends BaseObjectCreator
implements ObjectCreator

Since:
07/04/14.
Author:
Matthieu Mestrez, Willemijn Wouters

Constructor Summary
ObjectCreatorMockedFieldsImpl()
           
ObjectCreatorMockedFieldsImpl(Generator... generators)
           
 
Method Summary
protected  boolean checkForCreatingAnInstance(ObjectCreatorTypeWrapper wrapper)
           
protected  boolean constructorNotEmpty(Constructor<?> constructor)
          This method checks if this constructor is the default constructor.
protected  Object createObject(List<TreeNode> nodes)
           
protected  Object createObject(Type type)
           
 Object createRandomObject(TreeNode bean)
           
 Object createRandomObject(Type type)
           
protected  Constructor<?> getConstructor(Class<?> clzz)
          This method gets the first constructor that isn't generated by the compiler.
protected  boolean isConstant(Field field)
           
protected  boolean isDefaultConstructor(Constructor<?> constructor)
          Returns true if this is the default constructor.
protected  boolean isPrimitive(ObjectCreatorTypeWrapper wrapper)
          This method checks if the wrapper is a primitive.
 
Methods inherited from class org.unitils.objectvalidation.objectcreator.BaseObjectCreator
addGenerators, getGenerator, getGeneratorOfType, getGeneratorOfType, getGenerators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.unitils.objectvalidation.ObjectCreator
addGenerators, getGenerator, getGeneratorOfType, getGenerators
 

Constructor Detail

ObjectCreatorMockedFieldsImpl

public ObjectCreatorMockedFieldsImpl()

ObjectCreatorMockedFieldsImpl

public ObjectCreatorMockedFieldsImpl(Generator... generators)
Parameters:
generators -
Method Detail

createRandomObject

public Object createRandomObject(Type type)
Specified by:
createRandomObject in interface ObjectCreator

checkForCreatingAnInstance

protected boolean checkForCreatingAnInstance(ObjectCreatorTypeWrapper wrapper)

createObject

protected Object createObject(Type type)

createObject

protected Object createObject(List<TreeNode> nodes)

createRandomObject

public Object createRandomObject(TreeNode bean)
Specified by:
createRandomObject in interface ObjectCreator

constructorNotEmpty

protected boolean constructorNotEmpty(Constructor<?> constructor)
This method checks if this constructor is the default constructor.

Parameters:
constructor -
Returns:
boolean

isDefaultConstructor

protected boolean isDefaultConstructor(Constructor<?> constructor)
Returns true if this is the default constructor.

Parameters:
constructor -
Returns:
Boolean

getConstructor

protected Constructor<?> getConstructor(Class<?> clzz)
This method gets the first constructor that isn't generated by the compiler.

Parameters:
clzz -
Returns:
Constructor

isPrimitive

protected boolean isPrimitive(ObjectCreatorTypeWrapper wrapper)
This method checks if the wrapper is a primitive.

Parameters:
wrapper -
Returns:
boolean

isConstant

protected boolean isConstant(Field field)


Copyright © 2013-2015. All Rights Reserved.