1 7 8 package javax.lang.model.util; 9 10 11 import java.util.List ; 12 import javax.lang.model.element.*; 13 14 import javax.lang.model.type.TypeMirror; 15 import static javax.lang.model.SourceVersion.*; 16 import javax.lang.model.SourceVersion; 17 import javax.annotation.processing.SupportedSourceVersion; 18 19 57 @SupportedSourceVersion(RELEASE_6) 58 public class SimpleAnnotationValueVisitor6<R, P> 59 extends AbstractAnnotationValueVisitor6<R, P> { 60 61 66 protected final R DEFAULT_VALUE; 67 68 72 protected SimpleAnnotationValueVisitor6() { 73 super(); 74 DEFAULT_VALUE = null; 75 } 76 77 83 protected SimpleAnnotationValueVisitor6(R defaultValue) { 84 super(); 85 DEFAULT_VALUE = defaultValue; 86 } 87 88 97 protected R defaultAction(Object o, P p) { 98 return DEFAULT_VALUE; 99 } 100 101 108 public R visitBoolean(boolean b, P p) { 109 return defaultAction(b, p); 110 } 111 112 119 public R visitByte(byte b, P p) { 120 return defaultAction(b, p); 121 } 122 123 130 public R visitChar(char c, P p) { 131 return defaultAction(c, p); 132 } 133 134 141 public R visitDouble(double d, P p) { 142 return defaultAction(d, p); 143 } 144 145 152 public R visitFloat(float f, P p) { 153 return defaultAction(f, p); 154 } 155 156 163 public R visitInt(int i, P p) { 164 return defaultAction(i, p); 165 } 166 167 174 public R visitLong(long i, P p) { 175 return defaultAction(i, p); 176 } 177 178 185 public R visitShort(short s, P p) { 186 return defaultAction(s, p); 187 } 188 189 196 public R visitString(String s, P p) { 197 return defaultAction(s, p); 198 } 199 200 207 public R visitType(TypeMirror t, P p) { 208 return defaultAction(t, p); 209 } 210 211 218 public R visitEnumConstant(VariableElement c, P p) { 219 return defaultAction(c, p); 220 } 221 222 229 public R visitAnnotation(AnnotationMirror a, P p) { 230 return defaultAction(a, p); 231 } 232 233 240 public R visitArray(List <? extends AnnotationValue> vals, P p) { 241 return defaultAction(vals, p); 242 } 243 } 244 | Popular Tags |