org.unitils.objectvalidation.rules
Class NoPublicFieldsRule

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

public final class NoPublicFieldsRule
extends Object
implements Rule

This rule ensures that no fields declared with public visibility. Only those that are static final. public static fields should always be final to avoid funky shit in the application.

Since:
1.1.6
Author:
Thomas De Rycke
See Also:
Object Validation module

Constructor Summary
NoPublicFieldsRule()
           
 
Method Summary
 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

NoPublicFieldsRule

public NoPublicFieldsRule()
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
See Also:
Rule.validate(java.lang.Class)


Copyright © 2013-2015. All Rights Reserved.