Class 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 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