8275360: Use @Override in javax.annotation.processing

Reviewed-by: iris
This commit is contained in:
Joe Darcy 2021-10-18 16:11:16 +00:00
parent 4d383b9fcd
commit 426bcee927
2 changed files with 5 additions and 1 deletions

View File

@ -79,6 +79,7 @@ public abstract class AbstractProcessor implements Processor {
* @return the options recognized by this processor, or an empty * @return the options recognized by this processor, or an empty
* set if none * set if none
*/ */
@Override
public Set<String> getSupportedOptions() { public Set<String> getSupportedOptions() {
SupportedOptions so = this.getClass().getAnnotation(SupportedOptions.class); SupportedOptions so = this.getClass().getAnnotation(SupportedOptions.class);
return (so == null) ? return (so == null) ?
@ -101,6 +102,7 @@ public abstract class AbstractProcessor implements Processor {
* @return the names of the annotation interfaces supported by * @return the names of the annotation interfaces supported by
* this processor, or an empty set if none * this processor, or an empty set if none
*/ */
@Override
public Set<String> getSupportedAnnotationTypes() { public Set<String> getSupportedAnnotationTypes() {
SupportedAnnotationTypes sat = this.getClass().getAnnotation(SupportedAnnotationTypes.class); SupportedAnnotationTypes sat = this.getClass().getAnnotation(SupportedAnnotationTypes.class);
boolean initialized = isInitialized(); boolean initialized = isInitialized();
@ -128,6 +130,7 @@ public abstract class AbstractProcessor implements Processor {
* *
* @return the latest source version supported by this processor * @return the latest source version supported by this processor
*/ */
@Override
public SourceVersion getSupportedSourceVersion() { public SourceVersion getSupportedSourceVersion() {
SupportedSourceVersion ssv = this.getClass().getAnnotation(SupportedSourceVersion.class); SupportedSourceVersion ssv = this.getClass().getAnnotation(SupportedSourceVersion.class);
SourceVersion sv = null; SourceVersion sv = null;
@ -167,6 +170,7 @@ public abstract class AbstractProcessor implements Processor {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public abstract boolean process(Set<? extends TypeElement> annotations, public abstract boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv); RoundEnvironment roundEnv);
@ -178,6 +182,7 @@ public abstract class AbstractProcessor implements Processor {
* @param member {@inheritDoc} * @param member {@inheritDoc}
* @param userText {@inheritDoc} * @param userText {@inheritDoc}
*/ */
@Override
public Iterable<? extends Completion> getCompletions(Element element, public Iterable<? extends Completion> getCompletions(Element element,
AnnotationMirror annotation, AnnotationMirror annotation,
ExecutableElement member, ExecutableElement member,

View File

@ -52,7 +52,6 @@ public class Completions {
return value; return value;
} }
public String getMessage() { public String getMessage() {
return message; return message;
} }