Signature.java 文件源码

java
阅读 57 收藏 0 点赞 0 评论 0

项目:koryphe 作者:
protected static Class getTypeClass(final Type type, final Map<TypeVariable<?>, Type> typeArgs) {
    Type rawType = type;
    if (type instanceof ParameterizedType) {
        rawType = ((ParameterizedType) type).getRawType();
    }

    if (rawType instanceof Class) {
        return (Class) rawType;
    }


    if (rawType instanceof TypeVariable) {
        final Type t = typeArgs.get(rawType);
        if (null != t) {
            return getTypeClass(t, typeArgs);
        }
    }
    // cannot resolve - default to UnknownGenericType;
    return UnknownGenericType.class;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号