public abstract class Jsr305AnnotationsCheck.AbstractJsr305Handler extends Object
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkContainsAll(String msg,
com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation... search)
Emits a violation if all given annotations are found.
|
protected void |
checkContainsAny(String msg,
com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation... search)
Emits a violation if any of the given annotations are found.
|
protected void |
checkContainsNone(String msg,
com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation... search)
Make sure that none of the given annotations are present.
|
protected void |
checkRedundancyDueToClassLevelAnnotation(String msg,
com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation... search)
Emits a violation if both this and the parent class have redundant nullness annotations.
|
protected com.puppycrawl.tools.checkstyle.api.DetailAST |
getAst()
Returns the ast.
|
protected com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation |
getParentMethodOrClassAnnotation(com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation... annotationsToLookFor)
Gets the nullness annotation for the parent method or class.
|
void |
handle()
Run the actual handler.
|
protected boolean |
isMethodOverridden()
Is the current method overridden.
|
protected abstract void |
runHandler()
Run the actual handler.
|
public final void handle()
protected abstract void runHandler()
protected com.puppycrawl.tools.checkstyle.api.DetailAST getAst()
protected void checkContainsAny(String msg, com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation... search)
msg - the violation message to emitsearch - the annotations to look forprotected void checkContainsAll(String msg, com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation... search)
msg - the violation message to emitsearch - the annotations to look forprotected void checkRedundancyDueToClassLevelAnnotation(String msg, com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation... search)
msg - the violation message to emitsearch - the annotations to look forprotected void checkContainsNone(String msg, com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation... search)
msg - the violation message to emit if one of the given annotations was foundsearch - the annotations to look forprotected com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation getParentMethodOrClassAnnotation(com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck.NullnessAnnotation... annotationsToLookFor)
annotationsToLookFor - the annotations to look for.protected boolean isMethodOverridden()
Copyright © 2021. All rights reserved.