Skip to content
This repository has been archived by the owner on Nov 16, 2024. It is now read-only.

Commit

Permalink
#9 Display bounds for type variables in class names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerald Boersma committed Apr 11, 2020
1 parent 2fa2863 commit fa43400
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,16 @@ private static String buildParameterString(Type type) {
sb.append(sep);
TypeVariable typeParam = typeParams[i];
sb.append(typeParam.simpleTypeName());
// If the type has any bounds, display them.
if (typeParam.bounds().length > 0) {
sb.append(" extends ");
String sep2 = "";
for (Type bound: typeParam.bounds()) {
sb.append(sep2);
sb.append(bound.simpleTypeName());
sep2 = ",";
}
}
sep = ", ";
}
}
Expand Down

0 comments on commit fa43400

Please sign in to comment.