FindBugs™ 1.3.9

edu.umd.cs.findbugs.ba
Interface INullnessAnnotationDatabase

All Known Implementing Classes:
NullnessAnnotationDatabase, TypeQualifierNullnessAnnotationDatabase

public interface INullnessAnnotationDatabase

Interface for querying nullness annotations on methods, fields, and parameters.

Author:
David Hovemeyer

Method Summary
 void addDefaultAnnotation(AnnotationDatabase.Target target, java.lang.String c, NullnessAnnotation n)
          Add a default annotation to the database.
 void addFieldAnnotation(java.lang.String cName, java.lang.String mName, java.lang.String mSig, boolean isStatic, NullnessAnnotation annotation)
          Add a field annotation to the database.
 void addMethodAnnotation(java.lang.String cName, java.lang.String mName, java.lang.String mSig, boolean isStatic, NullnessAnnotation annotation)
          Add a method annotation to the database.
 void addMethodParameterAnnotation(java.lang.String cName, java.lang.String mName, java.lang.String mSig, boolean isStatic, int param, NullnessAnnotation annotation)
          Add a method parameter annotation to the database.
 NullnessAnnotation getResolvedAnnotation(java.lang.Object o, boolean getMinimal)
          Get a resolved NullnessAnnotation on given XMethod, XField, or XMethodParameter.
 void loadAuxiliaryAnnotations()
          Load "built-in" annotations that might not be evident from the analyzed/referenced code.
 boolean parameterMustBeNonNull(XMethod m, int param)
          Determine whether given parameter must be non-null.
 

Method Detail

parameterMustBeNonNull

boolean parameterMustBeNonNull(XMethod m,
                               int param)
Determine whether given parameter must be non-null.

Parameters:
m - a method
param - parameter (0 == first parameter)
Returns:
true if the parameter must be non-null, false otherwise

getResolvedAnnotation

@CheckForNull
NullnessAnnotation getResolvedAnnotation(java.lang.Object o,
                                                      boolean getMinimal)
Get a resolved NullnessAnnotation on given XMethod, XField, or XMethodParameter.

Parameters:
o - an XMethod, XField, or XMethodParameter
getMinimal - TODO: what does this mean?
Returns:
resolved NullnessAnnotation

loadAuxiliaryAnnotations

void loadAuxiliaryAnnotations()
Load "built-in" annotations that might not be evident from the analyzed/referenced code.


addFieldAnnotation

void addFieldAnnotation(@DottedClassName
                        java.lang.String cName,
                        java.lang.String mName,
                        java.lang.String mSig,
                        boolean isStatic,
                        NullnessAnnotation annotation)
Add a field annotation to the database.

Parameters:
cName - dotted class name
mName - field name
mSig - field signature
isStatic - true if field is static, false otherwise
annotation - NullnessAnnotation to add

addMethodAnnotation

void addMethodAnnotation(@DottedClassName
                         java.lang.String cName,
                         java.lang.String mName,
                         java.lang.String mSig,
                         boolean isStatic,
                         NullnessAnnotation annotation)
Add a method annotation to the database.

Parameters:
cName - dotted class name
mName - method name
mSig - method signature
isStatic - true if method is static, false otherwise
annotation - NullnessAnnotation to add

addMethodParameterAnnotation

void addMethodParameterAnnotation(@DottedClassName
                                  java.lang.String cName,
                                  java.lang.String mName,
                                  java.lang.String mSig,
                                  boolean isStatic,
                                  int param,
                                  NullnessAnnotation annotation)
Add a method parameter annotation to the database.

Parameters:
cName - dotted class name
mName - method name
mSig - method signature
isStatic - true if method is static, false otherwise
param - parameter (0 == first parameter)
annotation - the NullnessAnnotation to add

addDefaultAnnotation

void addDefaultAnnotation(AnnotationDatabase.Target target,
                          @DottedClassName
                          java.lang.String c,
                          NullnessAnnotation n)
Add a default annotation to the database.

Parameters:
target - one of AnnotationDatabase.METHOD, AnnotationDatabase.FIELD, AnnotationDatabase.PARAMETER, or AnnotationDatabase.ANY
c - dotted class name of class default annotation pertains to
n - the default NullnessAnnotation

FindBugs™ 1.3.9

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.