title: Java validation of object with annotation directly
body: <p>The conventional way of java validation is to define a class with properties and annotated with one or many validation constraint annotations such as <code>@NotNull</code> or <code>@Future</code>. </p>
  
  <p>Is it possible to validate an object directly with validator constraint annotation without specifying a class. For example:</p>
  
  <pre><code>String a = "";
  validator.validate(a, javax.validation.constraints.NotNull.class);
  </code></pre>