1 /*
2  * Hibernate Validator, declare and validate application constraints
3  *
4  * License: Apache License, Version 2.0
5  * See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
6  */

7 package org.hibernate.validator.internal.engine.valueextraction;
8
9 import java.lang.annotation.Annotation;
10 import java.lang.reflect.AnnotatedType;
11 import java.lang.reflect.Type;
12 import java.lang.reflect.TypeVariable;
13
14 /**
15  * A pseudo type variable used to express that the annotated element itself (e.g. a list) has been marked for
16  * cascaded validation.
17  *
18  * @author Gunnar Morling
19  */

20 public class AnnotatedObject implements TypeVariable<Class<?>> {
21
22     public static final AnnotatedObject INSTANCE = new AnnotatedObject();
23
24     private AnnotatedObject() {
25     }
26
27     @Override
28     public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
29         throw new UnsupportedOperationException();
30     }
31
32     @Override
33     public Annotation[] getAnnotations() {
34         throw new UnsupportedOperationException();
35     }
36
37     @Override
38     public Annotation[] getDeclaredAnnotations() {
39         throw new UnsupportedOperationException();
40     }
41
42     @Override
43     public Type[] getBounds() {
44         throw new UnsupportedOperationException();
45     }
46
47     @Override
48     public Class<?> getGenericDeclaration() {
49         throw new UnsupportedOperationException();
50     }
51
52     @Override
53     public String getName() {
54         throw new UnsupportedOperationException();
55     }
56
57     @Override
58     public AnnotatedType[] getAnnotatedBounds() {
59         throw new UnsupportedOperationException();
60     }
61
62     @Override
63     public String toString() {
64         return "AnnotatedObject.INSTANCE";
65     }
66 }
67