Package edu.umd.cs.findbugs.ba.jsr305
Class TypeQualifierDatabase
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDatabase
-
public class TypeQualifierDatabase extends java.lang.ObjectStore computed type qualifiers for method parameters and return values. This allows interprocedural checking of type qualifiers.- Author:
- David Hovemeyer
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEBUGstatic booleanUSE_DATABASEIf true, populate and use interprocedural database.
-
Constructor Summary
Constructors Constructor Description TypeQualifierDatabase()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeQualifierAnnotationgetParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue<?> tqv)Get the TypeQualifierAnnotation on a parameter.TypeQualifierAnnotationgetReturnValue(MethodDescriptor methodDesc, TypeQualifierValue<?> tqv)Get the TypeQualifierAnnotation on a method return value.voidsetParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue<?> tqv, TypeQualifierAnnotation tqa)Set a TypeQualifierAnnotation on a method parameter.voidsetReturnValue(MethodDescriptor methodDesc, TypeQualifierValue<?> tqv, TypeQualifierAnnotation tqa)Set a TypeQualifierAnnotation on a method return value.
-
-
-
Method Detail
-
setReturnValue
public void setReturnValue(MethodDescriptor methodDesc, TypeQualifierValue<?> tqv, TypeQualifierAnnotation tqa)
Set a TypeQualifierAnnotation on a method return value.- Parameters:
methodDesc- the methodtqv- the type qualifiertqa- the type qualifier annotation
-
getReturnValue
public TypeQualifierAnnotation getReturnValue(MethodDescriptor methodDesc, TypeQualifierValue<?> tqv)
Get the TypeQualifierAnnotation on a method return value.- Parameters:
methodDesc- the methodtqv- the type qualifier- Returns:
- the type qualifier annotation on the method return value, or null if no (interesting) type qualifier annotation was computed for this method
-
setParameter
public void setParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue<?> tqv, TypeQualifierAnnotation tqa)
Set a TypeQualifierAnnotation on a method parameter.- Parameters:
methodDesc- the methodparam- the parameter (0 == first parameter)tqv- the type qualifiertqa- the type qualifier annotation
-
getParameter
public TypeQualifierAnnotation getParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue<?> tqv)
Get the TypeQualifierAnnotation on a parameter.- Parameters:
methodDesc- the methodparam- the parameter (0 == first parameter)tqv- the type qualifier- Returns:
- the type qualifier annotation on the method return value, or null if no (interesting) type qualifier annotation was computed for this method
-
-