org.unitils.objectvalidation.rules
Class GetterAndSetterComplientRule

java.lang.Object
  extended by org.unitils.objectvalidation.rules.GetterAndSetterComplientRule
All Implemented Interfaces:
Rule

public class GetterAndSetterComplientRule
extends Object
implements Rule

Rule to validate that every field is accessible with a getter and a setter. Also that if we set an object to the field that the getter will return it.

Since:
Oct 22, 2013
Author:
Jeroen Horemans, Matthieu Mestrez

Constructor Summary
GetterAndSetterComplientRule(ObjectCreator objectCreator, ObjectCloner objectCloner)
           
 
Method Summary
protected  void assertSetterIsComplient(Field fieldEntry, Object actual, Object simpleBean)
           
 void validate(Class<?> classToValidate)
          Will run the validations on the java class passed in parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetterAndSetterComplientRule

public GetterAndSetterComplientRule(ObjectCreator objectCreator,
                                    ObjectCloner objectCloner)
Method Detail

validate

public void validate(Class<?> classToValidate)
Description copied from interface: Rule
Will run the validations on the java class passed in parameter.

Specified by:
validate in interface Rule

assertSetterIsComplient

protected void assertSetterIsComplient(Field fieldEntry,
                                       Object actual,
                                       Object simpleBean)


Copyright © 2013-2015. All Rights Reserved.