Fix ActualType display.
This commit is contained in:
parent
99a5e40540
commit
6e8f1549d5
|
@ -250,7 +250,9 @@ public class ParamsBuildHelper {
|
|||
if (displayActualType) {
|
||||
if (globGicName.length > 0) {
|
||||
String gicName = genericMap.get(subTypeName) != null ? genericMap.get(subTypeName) : globGicName[0];
|
||||
appendComment = " (ActualType: " + JavaClassUtil.getClassSimpleName(gicName) + ")";
|
||||
if(!simpleName.equals(gicName)){
|
||||
appendComment = " (ActualType: " + JavaClassUtil.getClassSimpleName(gicName) + ")";
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(docField.getActualJavaType())) {
|
||||
appendComment = " (ActualType: " + JavaClassUtil.getClassSimpleName(docField.getActualJavaType()) + ")";
|
||||
|
|
|
@ -213,6 +213,9 @@ public class JavaClassUtil {
|
|||
*/
|
||||
public static String getClassSimpleName(String className) {
|
||||
if (className.contains(".")) {
|
||||
if (className.contains("<")) {
|
||||
className = className.substring(0, className.indexOf("<"));
|
||||
}
|
||||
int index = className.lastIndexOf(".");
|
||||
className = className.substring(index + 1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue