 <p>You could make use of <a href="http://docs.oracle.com/javase/tutorial/reflect/" rel="nofollow">java reflection API</a> and call <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getDeclaredFields--" rel="nofollow">Class#getDeclaredFields</a> to retrieve all fields in a class, iterate over the array returned by this method and call the register and pass it <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html#getName--" rel="nofollow">Field#getName</a></p> <pre><code>for(Field field : getClass().getDeclaredFields()) { validationRegisterer.register(field.getName(), MandatoryFieldValidator.class); } </code></pre>