Interface INullnessAnnotationDatabase
- All Known Implementing Classes:
NullnessAnnotationDatabase, TypeQualifierNullnessAnnotationDatabase
public interface INullnessAnnotationDatabase
Interface for querying nullness annotations on methods, fields, and
parameters.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a default annotation to the database.voidaddFieldAnnotation(String cName, String mName, String mSig, boolean isStatic, NullnessAnnotation annotation) Add a field annotation to the database.voidaddMethodAnnotation(String cName, String mName, String mSig, boolean isStatic, NullnessAnnotation annotation) Add a method annotation to the database.voidaddMethodParameterAnnotation(String cName, String mName, String mSig, boolean isStatic, int param, NullnessAnnotation annotation) Add a method parameter annotation to the database.getResolvedAnnotation(Object o, boolean getMinimal) Get a resolved NullnessAnnotation on given XMethod, XField, or XMethodParameter.voidLoad "built-in" annotations that might not be evident from the analyzed/referenced code.booleanparameterMustBeNonNull(XMethod m, int param) Determine whether given parameter must be non-null.
-
Method Details
-
parameterMustBeNonNull
Determine whether given parameter must be non-null.- Parameters:
m- a methodparam- parameter (0 == first parameter)- Returns:
- true if the parameter must be non-null, false otherwise
-
getResolvedAnnotation
Get a resolved NullnessAnnotation on given XMethod, XField, or XMethodParameter.- Parameters:
o- an XMethod, XField, or XMethodParametergetMinimal- 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 String cName, String mName, String mSig, boolean isStatic, NullnessAnnotation annotation) Add a field annotation to the database.- Parameters:
cName- dotted class namemName- field namemSig- field signatureisStatic- true if field is static, false otherwiseannotation- NullnessAnnotation to add
-
addMethodAnnotation
void addMethodAnnotation(@DottedClassName String cName, String mName, String mSig, boolean isStatic, NullnessAnnotation annotation) Add a method annotation to the database.- Parameters:
cName- dotted class namemName- method namemSig- method signatureisStatic- true if method is static, false otherwiseannotation- NullnessAnnotation to add
-
addMethodParameterAnnotation
void addMethodParameterAnnotation(@DottedClassName String cName, String mName, String mSig, boolean isStatic, int param, NullnessAnnotation annotation) Add a method parameter annotation to the database.- Parameters:
cName- dotted class namemName- method namemSig- method signatureisStatic- true if method is static, false otherwiseparam- parameter (0 == first parameter)annotation- the NullnessAnnotation to add
-
addDefaultAnnotation
void addDefaultAnnotation(AnnotationDatabase.Target target, @DottedClassName String c, NullnessAnnotation n) Add a default annotation to the database.- Parameters:
target- one of AnnotationDatabase.METHOD, AnnotationDatabase.FIELD, AnnotationDatabase.PARAMETER, or AnnotationDatabase.ANYc- dotted class name of class default annotation pertains ton- the default NullnessAnnotation
-