Creating Custom Annotation in Java to force UPPER or lower Case
<p>Appreciate any help for creating custom annotation in JAVA by forcing Upper or Lower case for a pojo field. Like to get something like below</p>

<pre><code>// CaseMode enum would be
public enum CaseMode {
   UPPER, LOWER;
}

@Target({ ElementType.FIELD, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
public @interface Case {
    // NEED HELP HERE
}

public class Customer {
    @Case(value=CaseMode.UPPER)
    private String fName; 
    { set; get; }
}
</code></pre>

<p>setter method in Customer Object by default should force data to be stored in UPPERCASE or LOWERCASE based on annotation. Appreciate any help to get this.</p>

<p>Thanks in advance</p>
