Package edu.umd.cs.findbugs.detect
Class CheckRelaxingNullnessAnnotation
java.lang.Object
org.objectweb.asm.ClassVisitor
org.objectweb.asm.tree.ClassNode
edu.umd.cs.findbugs.asm.ClassNodeDetector
edu.umd.cs.findbugs.detect.CheckRelaxingNullnessAnnotation
- All Implemented Interfaces:
Detector2,Priorities
Checks that overriding methods do not relax
Nonnull (made
CheckForNull) on return values or CheckForNull (made
Nonnull) on parameters.
The code accepts also old (deprecated) nullness annotations from
edu.umd.cs.findbugs.annotations package.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classprivate class -
Field Summary
FieldsFields inherited from class edu.umd.cs.findbugs.asm.ClassNodeDetector
bugReporterFields inherited from class org.objectweb.asm.tree.ClassNode
access, attrs, fields, innerClasses, interfaces, invisibleAnnotations, invisibleTypeAnnotations, methods, module, name, nestHostClass, nestMembers, outerClass, outerMethod, outerMethodDesc, permittedSubclasses, recordComponents, signature, sourceDebug, sourceFile, superName, version, visibleAnnotations, visibleTypeAnnotationsFields inherited from class org.objectweb.asm.ClassVisitor
api, cvFields inherited from interface edu.umd.cs.findbugs.Priorities
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static booleanareRelated(String sig, String superSig) (package private) static booleancompatibleParameters(String signature, String superSignature) (package private) static booleancontainsNullness(Collection<AnnotationValue> annotations, NullnessAnnotation nullness) (package private) static booleancontainsRelaxedNonNull(List<org.objectweb.asm.tree.AnnotationNode> methodAnnotations) (package private) XClassgetClassInfo(ClassDescriptor classDescr) (package private) static Map<Integer, NullnessAnnotation> getNonnullOrNullableParams(List<org.objectweb.asm.tree.AnnotationNode>[] parameterAnnotations) (package private) static NullnessAnnotationgetNullness(String annotationDesc) voidvisitClass(ClassDescriptor classDescriptor) Visit a class.org.objectweb.asm.MethodVisitorvisitMethod(int methodAccess, String methodName, String desc, String methodSignature, String[] exceptions) Methods inherited from class edu.umd.cs.findbugs.asm.ClassNodeDetector
finishPass, getDetectorClassNameMethods inherited from class org.objectweb.asm.tree.ClassNode
accept, check, visit, visitAnnotation, visitAttribute, visitEnd, visitField, visitInnerClass, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotationMethods inherited from class org.objectweb.asm.ClassVisitor
getDelegate
-
Field Details
-
xclass
XClass xclass
-
-
Constructor Details
-
CheckRelaxingNullnessAnnotation
-
-
Method Details
-
visitClass
Description copied from interface:Detector2Visit a class.- Specified by:
visitClassin interfaceDetector2- Overrides:
visitClassin classClassNodeDetector- Parameters:
classDescriptor- descriptor naming the class to visit- Throws:
CheckedAnalysisException- if an exception occurs during analysis
-
getClassInfo
-
visitMethod
public org.objectweb.asm.MethodVisitor visitMethod(int methodAccess, String methodName, String desc, String methodSignature, String[] exceptions) - Overrides:
visitMethodin classorg.objectweb.asm.tree.ClassNode
-
containsRelaxedNonNull
static boolean containsRelaxedNonNull(@CheckForNull List<org.objectweb.asm.tree.AnnotationNode> methodAnnotations) -
getNonnullOrNullableParams
@CheckForNull static Map<Integer,NullnessAnnotation> getNonnullOrNullableParams(@CheckForNull List<org.objectweb.asm.tree.AnnotationNode>[] parameterAnnotations) -
getNullness
-
containsNullness
static boolean containsNullness(Collection<AnnotationValue> annotations, NullnessAnnotation nullness) -
compatibleParameters
-
areRelated
-