Java Utililty Methods Reflection Type

List of utility methods to do Reflection Type

Description

The list of methods to do Reflection Type are organized into topic(s).

Method

ClassgetRawType(Type type)
Copied from com.google.inject.internal.MoreTypes.getRawType(Type)
if (type instanceof Class<?>) {
    return (Class<?>) type;
} else if (type instanceof ParameterizedType) {
    ParameterizedType parameterizedType = (ParameterizedType) type;
    Type rawType = parameterizedType.getRawType();
    if (!(rawType instanceof Class)) {
        String message = MessageFormat.format("Expected a Class, but <{0}> is of type {1}", type,
                type.getClass().getName());
...