Enum Class NullPointerTester.NullnessAnnotationReader

java.lang.Object
java.lang.Enum<NullPointerTester.NullnessAnnotationReader>
com.google.common.testing.NullPointerTester.NullnessAnnotationReader
All Implemented Interfaces:
Serializable, Comparable<NullPointerTester.NullnessAnnotationReader>, Constable
Enclosing class:
NullPointerTester

private static enum NullPointerTester.NullnessAnnotationReader extends Enum<NullPointerTester.NullnessAnnotationReader>
Looks for declaration nullness annotations and, if supported, type-use nullness annotations.

Under Android VMs, the methods for retrieving type-use annotations don't exist. This means that NullPointerTester may misbehave under Android when used on classes that rely on type-use annotations.

Under j2objc, the necessary APIs exist, but some (perhaps all) return stub values, like empty arrays. Presumably NullPointerTester could likewise misbehave under j2objc, but I don't know that anyone uses it there, anyway.

  • Enum Constant Details

  • Constructor Details

    • NullnessAnnotationReader

      private NullnessAnnotationReader()
  • Method Details

    • values

      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NullPointerTester.NullnessAnnotationReader valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isNullable

      abstract boolean isNullable(Invokable<?,?> invokable)
    • isNullable

      abstract boolean isNullable(Parameter param)