MCPcopy
hub / github.com/google/guava / getRawType

Method getRawType

guava/src/com/google/common/reflect/TypeToken.java:193–207  ·  view source on GitHub ↗

Returns the raw type of {@code T}. Formally speaking, if {@code T} is returned by {@link java.lang.reflect.Method#getGenericReturnType}, the raw type is what's returned by {@link java.lang.reflect.Method#getReturnType} of the same method object. Specifically: <ul> <li>If {@code T} is a {@code Cla

()

Source from the content-addressed store, hash-verified

191 * </ul>
192 */
193 public final Class<? super T> getRawType() {
194 if (runtimeType instanceof Class) {
195 @SuppressWarnings("unchecked") // raw type is T
196 Class<? super T> result = (Class<? super T>) runtimeType;
197 return result;
198 } else if (runtimeType instanceof ParameterizedType) {
199 @SuppressWarnings("unchecked") // raw type is |T|
200 Class<? super T> result = (Class<? super T>) ((ParameterizedType) runtimeType).getRawType();
201 return result;
202 } else {
203 // For a wildcard or type variable, the first bound determines the runtime type.
204 // This case also covers GenericArrayType.
205 return getRawTypes().iterator().next();
206 }
207 }
208
209 /** Returns the represented type. */
210 public final Type getType() {

Calls 3

getRawTypesMethod · 0.95
nextMethod · 0.65
iteratorMethod · 0.65