my dog learned polymorphism
The moose likes Other JSE/JEE APIs and the fly likes Constraint Annotation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Constraint Annotation" Watch "Constraint Annotation" New topic

Constraint Annotation

Lopez Mirinda

Joined: Apr 11, 2007
Posts: 11

I have a NotNull annotation defined here which uses the javax.validation.Constraint.

a1.annotationType().isAnnotationPresent(javax.validation.Constraint.class) returns false though it is present.
a1.annotationType().isAnnotationPresent(javax.validation.Constraint.class) returns true

Is it possible to get hold of @Constraint and the value of validatedBy?

Thanks in Advance,

It is sorta covered in the JavaRanch Style Guide.
subject: Constraint Annotation
It's not a secret anymore!