Class Validator
- java.lang.Object
-
- org.robolectric.annotation.processing.validator.Validator
-
- All Implemented Interfaces:
ElementVisitor<Void,Element>
- Direct Known Subclasses:
FoundOnImplementsValidator
,ImplementsValidator
public abstract class Validator extends Object implements ElementVisitor<Void,Element>
Base class for validators.
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description Validator(RobolectricModel.Builder modelBuilder, ProcessingEnvironment env, String annotationType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.lang.model.element.ElementVisitor
visitModule
-
-
-
-
Field Detail
-
modelBuilder
protected final RobolectricModel.Builder modelBuilder
-
elements
protected final Elements elements
-
types
protected final Types types
-
messager
protected final Messager messager
-
annotationType
protected final TypeElement annotationType
-
helpers
protected final Helpers helpers
-
currentElement
protected Element currentElement
-
currentAnnotation
protected AnnotationMirror currentAnnotation
-
-
Constructor Detail
-
Validator
public Validator(RobolectricModel.Builder modelBuilder, ProcessingEnvironment env, String annotationType)
-
-
Method Detail
-
getCurrentAnnotation
protected AnnotationMirror getCurrentAnnotation()
-
message
protected void message(Diagnostic.Kind severity, String msg, AnnotationValue av)
-
message
protected void message(Diagnostic.Kind severity, String msg)
-
error
protected void error(String msg)
-
error
protected void error(String msg, AnnotationValue av)
-
getAnnotationType
public TypeElement getAnnotationType()
-
visit
public Void visit(Element e, Element p)
- Specified by:
visit
in interfaceElementVisitor<Void,Element>
-
visitPackage
public Void visitPackage(PackageElement e, Element p)
- Specified by:
visitPackage
in interfaceElementVisitor<Void,Element>
-
visitType
public Void visitType(TypeElement e, Element p)
- Specified by:
visitType
in interfaceElementVisitor<Void,Element>
-
visitVariable
public Void visitVariable(VariableElement e, Element p)
- Specified by:
visitVariable
in interfaceElementVisitor<Void,Element>
-
visitExecutable
public Void visitExecutable(ExecutableElement e, Element p)
- Specified by:
visitExecutable
in interfaceElementVisitor<Void,Element>
-
visitTypeParameter
public Void visitTypeParameter(TypeParameterElement e, Element p)
- Specified by:
visitTypeParameter
in interfaceElementVisitor<Void,Element>
-
visitUnknown
public Void visitUnknown(Element e, Element p)
- Specified by:
visitUnknown
in interfaceElementVisitor<Void,Element>
-
-