1 7 8 package javax.lang.model.util; 9 10 import javax.lang.model.element.*; 11 import javax.annotation.processing.SupportedSourceVersion; 12 import static javax.lang.model.element.ElementKind.*; 13 import javax.lang.model.SourceVersion; 14 import static javax.lang.model.SourceVersion.*; 15 16 17 59 @SupportedSourceVersion(RELEASE_6) 60 public class SimpleElementVisitor6<R, P> extends AbstractElementVisitor6<R, P> { 61 66 protected final R DEFAULT_VALUE; 67 68 72 protected SimpleElementVisitor6(){ 73 DEFAULT_VALUE = null; 74 } 75 76 82 protected SimpleElementVisitor6(R defaultValue){ 83 DEFAULT_VALUE = defaultValue; 84 } 85 94 protected R defaultAction(Element e, P p) { 95 return DEFAULT_VALUE; 96 } 97 98 105 public R visitPackage(PackageElement e, P p) { 106 return defaultAction(e, p); 107 } 108 109 116 public R visitType(TypeElement e, P p) { 117 return defaultAction(e, p); 118 } 119 120 127 public R visitVariable(VariableElement e, P p) { 128 return defaultAction(e, p); 129 } 130 131 138 public R visitExecutable(ExecutableElement e, P p) { 139 return defaultAction(e, p); 140 } 141 142 149 public R visitTypeParameter(TypeParameterElement e, P p) { 150 return defaultAction(e, p); 151 } 152 } 153 | Popular Tags |