View Javadoc

1   package javax.validation;
2   
3   import java.lang.annotation.ElementType;
4   import java.util.Set;
5   
6   /***
7    * Describes a validated element (class, field or property)
8    * 
9    */
10  public interface ElementDescriptor {
11  	/***
12  	 * Element type
13  	 */
14  	ElementType getElementType();
15  
16  	/***
17  	 * statically defined returned type //TODO should it be Type or even
18  	 * completly removed
19  	 */
20  	Class getReturnType();
21  
22  	/***
23  	 * is the association cascaded
24  	 */
25  	boolean isCascaded();
26  
27  	/***
28  	 * all the constraint descriptors for the given element
29  	 */
30  	Set<ConstraintDescriptor> getConstraintDescriptors();
31  
32  	/***
33  	 * Property path from the root entity validated. //FIXME there is a problem
34  	 * in describing cyclic dependencies
35  	 */
36  	String getPropertyPath();
37  }