public abstract class Validator extends Object implements ElementVisitor<Void,Element>
Base class for validators.
Modifier and Type | Field and Description |
---|---|
protected TypeElement |
annotationType |
protected AnnotationMirror |
currentAnnotation |
protected Element |
currentElement |
protected Elements |
elements |
protected Helpers |
helpers |
protected Messager |
messager |
protected RobolectricModel.Builder |
modelBuilder |
protected Types |
types |
Constructor and Description |
---|
Validator(RobolectricModel.Builder modelBuilder,
ProcessingEnvironment env,
String annotationType) |
Modifier and Type | Method and Description |
---|---|
protected void |
error(String msg) |
protected void |
error(String msg,
AnnotationValue av) |
TypeElement |
getAnnotationType() |
protected AnnotationMirror |
getCurrentAnnotation() |
void |
init(Element e,
Element p) |
protected void |
message(Diagnostic.Kind severity,
String msg) |
protected void |
message(Diagnostic.Kind severity,
String msg,
AnnotationValue av) |
Void |
visit(Element e) |
Void |
visit(Element e,
Element p) |
Void |
visitExecutable(ExecutableElement e,
Element p) |
Void |
visitPackage(PackageElement e,
Element p) |
Void |
visitType(TypeElement e,
Element p) |
Void |
visitTypeParameter(TypeParameterElement e,
Element p) |
Void |
visitUnknown(Element e,
Element p) |
Void |
visitVariable(VariableElement e,
Element p) |
protected final RobolectricModel.Builder modelBuilder
protected final Elements elements
protected final Types types
protected final Messager messager
protected final TypeElement annotationType
protected final Helpers helpers
protected Element currentElement
protected AnnotationMirror currentAnnotation
public Validator(RobolectricModel.Builder modelBuilder, ProcessingEnvironment env, String annotationType)
protected AnnotationMirror getCurrentAnnotation()
protected void message(Diagnostic.Kind severity, String msg, AnnotationValue av)
protected void message(Diagnostic.Kind severity, String msg)
protected void error(String msg)
protected void error(String msg, AnnotationValue av)
public TypeElement getAnnotationType()
public Void visit(Element e, Element p)
visit
in interface ElementVisitor<Void,Element>
public Void visitPackage(PackageElement e, Element p)
visitPackage
in interface ElementVisitor<Void,Element>
public Void visitType(TypeElement e, Element p)
visitType
in interface ElementVisitor<Void,Element>
public Void visitVariable(VariableElement e, Element p)
visitVariable
in interface ElementVisitor<Void,Element>
public Void visitExecutable(ExecutableElement e, Element p)
visitExecutable
in interface ElementVisitor<Void,Element>
public Void visitTypeParameter(TypeParameterElement e, Element p)
visitTypeParameter
in interface ElementVisitor<Void,Element>
public Void visitUnknown(Element e, Element p)
visitUnknown
in interface ElementVisitor<Void,Element>