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

Method unwrapTypeOrObject

java/dagger/internal/codegen/DaggerTypes.java:90–92  ·  view source on GitHub ↗

Returns type's single type argument, if one exists, or Object if not. For example, if type is List this will return Number. @throws IllegalArgumentException if type is not a declared type or has more than one type argument.

(TypeMirror type)

Source from the content-addressed store, hash-verified

88 * type argument.
89 */
90 TypeMirror unwrapTypeOrObject(TypeMirror type) {
91 return unwrapTypeOrDefault(type, elements.getTypeElement(Object.class).asType());
92 }
93
94 private TypeMirror unwrapTypeOrDefault(TypeMirror type, TypeMirror defaultType) {
95 DeclaredType declaredType = MoreTypes.asDeclared(type);

Callers 1

toMethod · 0.80

Calls 3

unwrapTypeOrDefaultMethod · 0.95
asTypeMethod · 0.80
getTypeElementMethod · 0.45

Tested by

no test coverage detected