Skip to content

Commit ad39b2a

Browse files
committed
enumのパラメータテーブル出力条件を実引数から仮引数に変更
1 parent 56b2f3a commit ad39b2a

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

jig-core/src/main/java/org/dddjava/jig/domain/model/data/enums/EnumModel.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ public List<String> constructorParameterNames() {
4646
.orElse(List.of());
4747
}
4848

49-
public boolean hasConstructorArguments() {
50-
return enumConstants.stream()
51-
.mapToInt(enumConstant -> enumConstant.argumentExpressions().size())
52-
.max()
53-
.orElse(0) > 0;
49+
public boolean hasConstructorParameter() {
50+
return !constructorParameterNames().isEmpty();
5451
}
5552
}

jig-core/src/main/resources/templates/fragment-type.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h3>列挙値</h3>
2424
</th:block>
2525
</dl>
2626

27-
<details th:if="${enumModel.hasConstructorArguments()}">
27+
<details th:if="${enumModel.hasConstructorParameter()}">
2828
<summary>列挙引数</summary>
2929
<table class="fields">
3030
<thead>

0 commit comments

Comments
 (0)