1 7 8 package javax.lang.model.util; 9 10 import javax.lang.model.type.*; 11 import javax.annotation.processing.SupportedSourceVersion; 12 import javax.lang.model.SourceVersion; 13 import static javax.lang.model.SourceVersion.*; 14 15 16 58 @SupportedSourceVersion(RELEASE_6) 59 public class SimpleTypeVisitor6<R, P> extends AbstractTypeVisitor6<R, P> { 60 65 protected final R DEFAULT_VALUE; 66 67 71 protected SimpleTypeVisitor6(){ 72 DEFAULT_VALUE = null; 73 } 74 75 81 protected SimpleTypeVisitor6(R defaultValue){ 82 DEFAULT_VALUE = defaultValue; 83 } 84 85 90 protected R defaultAction(TypeMirror e, P p) { 91 return DEFAULT_VALUE; 92 } 93 94 101 public R visitPrimitive(PrimitiveType t, P p) { 102 return defaultAction(t, p); 103 } 104 105 112 public R visitNull(NullType t, P p){ 113 return defaultAction(t, p); 114 } 115 116 123 public R visitArray(ArrayType t, P p){ 124 return defaultAction(t, p); 125 } 126 127 134 public R visitDeclared(DeclaredType t, P p){ 135 return defaultAction(t, p); 136 } 137 138 145 public R visitError(ErrorType t, P p){ 146 return defaultAction(t, p); 147 } 148 149 156 public R visitTypeVariable(TypeVariable t, P p){ 157 return defaultAction(t, p); 158 } 159 160 167 public R visitWildcard(WildcardType t, P p){ 168 return defaultAction(t, p); 169 } 170 171 178 public R visitExecutable(ExecutableType t, P p) { 179 return defaultAction(t, p); 180 } 181 182 189 public R visitNoType(NoType t, P p){ 190 return defaultAction(t, p); 191 } 192 } 193 | Popular Tags |