Q:

Can I use annotations in java to perform some actions e.g. Upper casing of values coming from a form.

I am starting with a utility projects which will give out of the box annotations to perform some tasks such as uppercasing, lowercasing, validating, performing some more trasnformation. As far I have seen that annotations are actually have no impact on code. So I want to know if there is a way that where I put the annotation on let say 
@Casing(type="MyEnum.UpperCase")
private String name;

and while saving or retrieving the value it gives UpperCase String of the input.

A:

In pure Java, You cannot do this. Annotations are passive elements in Java. Unfortunately, you can not write any code inside an annotation declaration.
But if you use some e.g Spring Stack you get a plenty way to do this e.g Aspect/AOP (exist in pure Java) performing a task on your annotation or you can create some Resolver Bean which makes this job behalf of you.   

