use of io.github.classgraph.TypeParameter in project conquery by bakdata.
the class GroupHandler method printType.
private String printType(Ctx ctx, TypeArgument type) {
if (type.getTypeSignature() == null) {
return "UNKNWON";
}
if (type.getTypeSignature() instanceof TypeVariableSignature) {
String v = type.getTypeSignature().toString();
TypeParameter typeParam = ctx.getField().getClassInfo().getTypeSignature().getTypeParameters().stream().filter(tp -> tp.getName().equals(v)).collect(MoreCollectors.onlyElement());
if (typeParam.getClassBound() != null) {
return printType(ctx, typeParam.getClassBound());
}
return printType(ctx, typeParam.getInterfaceBounds().get(0));
}
return printType(ctx, type.getTypeSignature());
}
Aggregations