I am using reflection to see if an annotation that is attached to a property of a class, is of a specific type. Current I am doing:
if(\"javax.validation.Valid\"
Just for completeness' sake, another possibility is
if (this.getClass().isAnnotationPresent(MyCustomAnnotation.class)) {