ClassUtils.java 文件源码

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

项目:graphql-spqr 作者:
/**
 * Scans classpath for implementations/subtypes of the given {@link AnnotatedType}. Only the matching classes are loaded.
 *
 * @param superType The type whose implementations/subtypes are to be looked for
 * @return A collection of {@link AnnotatedType}s found on the classpath that are implementations/subtypes of {@code superType}
 * @throws RuntimeException If a class file could not be parsed or a class could not be loaded
 */
public static List<AnnotatedType> findImplementations(AnnotatedType superType, String... packages) {
    Class<?> rawType = getRawType(superType.getType());
    return findImplementations(rawType, packages).stream()
            .map(raw -> GenericTypeReflector.getExactSubType(superType, raw))
            .filter(Objects::nonNull)
            .collect(Collectors.toList());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号