Class Validator
java.lang.Object
org.robolectric.annotation.processing.validator.Validator
- All Implemented Interfaces:
javax.lang.model.element.ElementVisitor<Void,
javax.lang.model.element.Element>
- Direct Known Subclasses:
FoundOnImplementsValidator
,ImplementsValidator
public abstract class Validator
extends Object
implements javax.lang.model.element.ElementVisitor<Void,javax.lang.model.element.Element>
Base class for validators.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final javax.lang.model.element.TypeElement
protected javax.lang.model.element.AnnotationMirror
protected javax.lang.model.element.Element
protected final javax.lang.model.util.Elements
protected final Helpers
protected final Messager
protected final RobolectricModel.Builder
protected final javax.lang.model.util.Types
-
Constructor Summary
ConstructorDescriptionValidator
(RobolectricModel.Builder modelBuilder, ProcessingEnvironment env, String annotationType) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
javax.lang.model.element.TypeElement
protected javax.lang.model.element.AnnotationMirror
void
init
(javax.lang.model.element.Element e, javax.lang.model.element.Element p) protected void
protected void
message
(javax.tools.Diagnostic.Kind severity, String msg, javax.lang.model.element.AnnotationValue av) visit
(javax.lang.model.element.Element e) visit
(javax.lang.model.element.Element e, javax.lang.model.element.Element p) visitExecutable
(javax.lang.model.element.ExecutableElement e, javax.lang.model.element.Element p) visitPackage
(javax.lang.model.element.PackageElement e, javax.lang.model.element.Element p) visitType
(javax.lang.model.element.TypeElement e, javax.lang.model.element.Element p) visitTypeParameter
(javax.lang.model.element.TypeParameterElement e, javax.lang.model.element.Element p) visitUnknown
(javax.lang.model.element.Element e, javax.lang.model.element.Element p) visitVariable
(javax.lang.model.element.VariableElement e, javax.lang.model.element.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, visitRecordComponent
-
Field Details
-
modelBuilder
-
elements
protected final javax.lang.model.util.Elements elements -
types
protected final javax.lang.model.util.Types types -
messager
-
annotationType
protected final javax.lang.model.element.TypeElement annotationType -
helpers
-
currentElement
protected javax.lang.model.element.Element currentElement -
currentAnnotation
protected javax.lang.model.element.AnnotationMirror currentAnnotation
-
-
Constructor Details
-
Validator
public Validator(RobolectricModel.Builder modelBuilder, ProcessingEnvironment env, String annotationType)
-
-
Method Details
-
getCurrentAnnotation
protected javax.lang.model.element.AnnotationMirror getCurrentAnnotation() -
message
protected void message(javax.tools.Diagnostic.Kind severity, String msg, javax.lang.model.element.AnnotationValue av) -
message
-
error
-
error
-
init
public void init(javax.lang.model.element.Element e, javax.lang.model.element.Element p) -
getAnnotationType
public javax.lang.model.element.TypeElement getAnnotationType() -
visit
- Specified by:
visit
in interfacejavax.lang.model.element.ElementVisitor<Void,
javax.lang.model.element.Element>
-
visit
- Specified by:
visit
in interfacejavax.lang.model.element.ElementVisitor<Void,
javax.lang.model.element.Element>
-
visitPackage
public Void visitPackage(javax.lang.model.element.PackageElement e, javax.lang.model.element.Element p) - Specified by:
visitPackage
in interfacejavax.lang.model.element.ElementVisitor<Void,
javax.lang.model.element.Element>
-
visitType
- Specified by:
visitType
in interfacejavax.lang.model.element.ElementVisitor<Void,
javax.lang.model.element.Element>
-
visitVariable
public Void visitVariable(javax.lang.model.element.VariableElement e, javax.lang.model.element.Element p) - Specified by:
visitVariable
in interfacejavax.lang.model.element.ElementVisitor<Void,
javax.lang.model.element.Element>
-
visitExecutable
public Void visitExecutable(javax.lang.model.element.ExecutableElement e, javax.lang.model.element.Element p) - Specified by:
visitExecutable
in interfacejavax.lang.model.element.ElementVisitor<Void,
javax.lang.model.element.Element>
-
visitTypeParameter
public Void visitTypeParameter(javax.lang.model.element.TypeParameterElement e, javax.lang.model.element.Element p) - Specified by:
visitTypeParameter
in interfacejavax.lang.model.element.ElementVisitor<Void,
javax.lang.model.element.Element>
-
visitUnknown
- Specified by:
visitUnknown
in interfacejavax.lang.model.element.ElementVisitor<Void,
javax.lang.model.element.Element>
-