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)
| 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. |
no test coverage detected