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

Method unwrappedElementType

java/dagger/internal/codegen/SetType.java:75–86  ·  view source on GitHub ↗

T if #elementType() is a WrappingClass . @throws IllegalStateException if #elementType() is not a WrappingClass @throws IllegalArgumentException if wrappingClass does not have exactly one type parameter

(Class<?> wrappingClass)

Source from the content-addressed store, hash-verified

73 * parameter
74 */
75 TypeMirror unwrappedElementType(Class<?> wrappingClass) {
76 checkArgument(
77 wrappingClass.getTypeParameters().length == 1,
78 "%s must have exactly one type parameter",
79 wrappingClass);
80 checkArgument(
81 elementsAreTypeOf(wrappingClass),
82 "expected elements to be %s, but this type is %s",
83 wrappingClass,
84 declaredSetType());
85 return MoreTypes.asDeclared(elementType()).getTypeArguments().get(0);
86 }
87
88 /**
89 * {@code true} if {@code type} is a {@link Set} type.

Callers 3

creationExpressionMethod · 0.95
unwrapSetKeyMethod · 0.95

Calls 4

elementsAreTypeOfMethod · 0.95
declaredSetTypeMethod · 0.95
elementTypeMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected