From fa43400bbc37f156edb7d0d7cba031e60cb97f24 Mon Sep 17 00:00:00 2001 From: Gerald Boersma Date: Sat, 11 Apr 2020 10:12:42 -0700 Subject: [PATCH] #9 Display bounds for type variables in class names. --- .../leadinglight/umljavadoclet/model/ModelClass.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/info/leadinglight/umljavadoclet/model/ModelClass.java b/src/main/java/info/leadinglight/umljavadoclet/model/ModelClass.java index 1e7faa4..336f6df 100644 --- a/src/main/java/info/leadinglight/umljavadoclet/model/ModelClass.java +++ b/src/main/java/info/leadinglight/umljavadoclet/model/ModelClass.java @@ -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 = ", "; } }