MCPcopy Index your code
hub / github.com/google/dagger / isOptional

Method isOptional

java/dagger/internal/codegen/OptionalType.java:132–134  ·  view source on GitHub ↗

Returns true if type is an Optional type.

(TypeMirror type)

Source from the content-addressed store, hash-verified

130
131 /** Returns {@code true} if {@code type} is an {@code Optional} type. */
132 static boolean isOptional(TypeMirror type) {
133 return type.accept(OPTIONAL_KIND, null).isPresent();
134 }
135
136 /** Returns {@code true} if {@code key.type()} is an {@code Optional} type. */
137 static boolean isOptional(Key key) {

Callers 2

unwrapOptionalMethod · 0.95
fromMethod · 0.95

Calls 2

acceptMethod · 0.80
typeMethod · 0.45

Tested by

no test coverage detected