Skip to content

Commit

Permalink
Add support for array type
Browse files Browse the repository at this point in the history
  • Loading branch information
yusu committed Feb 5, 2024
1 parent c7f50f7 commit 16ec867
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ public String generateCode() {
}

private String getImportName(ClassWrapper importType) {
return importType.getPackageName() + "." + importType.getShortRawName();
int index = importType.getShortRawName().indexOf("[]");
return index == -1 ? importType.getPackageName() + "." + importType.getShortRawName()
: importType.getPackageName() + "." + importType.getShortRawName().substring(0, index);
}

private boolean notContainImportedType(ClassWrapper classWrapper) {
Expand Down

0 comments on commit 16ec867

Please sign in to comment.