Package com.google.common.testing
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract boolean
isNullable
(Invokable<?, ?> invokable) (package private) abstract boolean
isNullable
(Parameter param) Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FROM_DECLARATION_AND_TYPE_USE_ANNOTATIONS
public static final NullPointerTester.NullnessAnnotationReader FROM_DECLARATION_AND_TYPE_USE_ANNOTATIONS -
FROM_DECLARATION_ANNOTATIONS_ONLY
-
-
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
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 nameNullPointerException
- if the argument is null
-
isNullable
-
isNullable
-