A simple abstraction for object and input validation in Java applications