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

Method from

java/dagger/internal/codegen/OptionalType.java:146–149  ·  view source on GitHub ↗

Returns a OptionalType for type. @throws IllegalArgumentException if type is not an Optional type

(TypeMirror type)

Source from the content-addressed store, hash-verified

144 * @throws IllegalArgumentException if {@code type} is not an {@code Optional} type
145 */
146 static OptionalType from(TypeMirror type) {
147 checkArgument(isOptional(type), "%s must be an Optional", type);
148 return new AutoValue_OptionalType(MoreTypes.equivalence().wrap(MoreTypes.asDeclared(type)));
149 }
150
151 /**
152 * Returns a {@link OptionalType} for {@code key}'s {@link Key#type() type}.

Callers 7

unwrapOptionalMethod · 0.95
ofMethod · 0.95

Calls 2

isOptionalMethod · 0.95
typeMethod · 0.45

Tested by

no test coverage detected