FindBugs™ 1.3.9

edu.umd.cs.findbugs.ba.jsr305
Class TypeQualifierDatabase

java.lang.Object
  extended by edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDatabase

public class TypeQualifierDatabase
extends java.lang.Object

Store computed type qualifiers for method parameters and return values. This allows interprocedural checking of type qualifiers.

Author:
David Hovemeyer

Field Summary
static boolean DEBUG
           
static boolean USE_DATABASE
          If true, populate and use interprocedural database.
 
Constructor Summary
TypeQualifierDatabase()
          Constructor.
 
Method Summary
 TypeQualifierAnnotation getParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue tqv)
          Get the TypeQualifierAnnotation on a parameter.
 TypeQualifierAnnotation getReturnValue(MethodDescriptor methodDesc, TypeQualifierValue tqv)
          Get the TypeQualifierAnnotation on a method return value.
 void setParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue tqv, TypeQualifierAnnotation tqa)
          Set a TypeQualifierAnnotation on a method parameter.
 void setReturnValue(MethodDescriptor methodDesc, TypeQualifierValue tqv, TypeQualifierAnnotation tqa)
          Set a TypeQualifierAnnotation on a method return value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_DATABASE

public static final boolean USE_DATABASE
If true, populate and use interprocedural database.


DEBUG

public static final boolean DEBUG
Constructor Detail

TypeQualifierDatabase

public TypeQualifierDatabase()
Constructor.

Method Detail

setReturnValue

public void setReturnValue(MethodDescriptor methodDesc,
                           TypeQualifierValue tqv,
                           TypeQualifierAnnotation tqa)
Set a TypeQualifierAnnotation on a method return value.

Parameters:
methodDesc - the method
tqv - the type qualifier
tqa - the type qualifier annotation

getReturnValue

public TypeQualifierAnnotation getReturnValue(MethodDescriptor methodDesc,
                                              TypeQualifierValue tqv)
Get the TypeQualifierAnnotation on a method return value.

Parameters:
methodDesc - the method
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

setParameter

public void setParameter(MethodDescriptor methodDesc,
                         int param,
                         TypeQualifierValue tqv,
                         TypeQualifierAnnotation tqa)
Set a TypeQualifierAnnotation on a method parameter.

Parameters:
methodDesc - the method
param - the parameter (0 == first parameter)
tqv - the type qualifier
tqa - the type qualifier annotation

getParameter

public TypeQualifierAnnotation getParameter(MethodDescriptor methodDesc,
                                            int param,
                                            TypeQualifierValue tqv)
Get the TypeQualifierAnnotation on a parameter.

Parameters:
methodDesc - the method
param - 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

FindBugs™ 1.3.9

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