org.unitils.objectvalidation.objectcreator
Class ObjectCreatorMockedFieldsImpl
java.lang.Object
org.unitils.objectvalidation.objectcreator.BaseObjectCreator
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectCreatorMockedFieldsImpl
public ObjectCreatorMockedFieldsImpl()
ObjectCreatorMockedFieldsImpl
public ObjectCreatorMockedFieldsImpl(Generator... generators)
- Parameters:
generators -
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.