|
33 | 33 | import java.time.LocalDate; |
34 | 34 | import java.time.LocalDateTime; |
35 | 35 | import java.time.LocalTime; |
36 | | -import java.util.Arrays; |
37 | 36 | import java.util.Collections; |
38 | 37 | import java.util.Iterator; |
39 | 38 | import java.util.List; |
|
120 | 119 |
|
121 | 120 | public class CtTypes { |
122 | 121 |
|
| 122 | + // Apply newDomainCtType, newEmbeddableCtType and newEntityCtType functions first. |
| 123 | + private final List<Function<TypeMirror, CtType>> functions = |
| 124 | + List.of( |
| 125 | + this::newDomainCtType, |
| 126 | + this::newEmbeddableCtType, |
| 127 | + this::newEntityCtType, |
| 128 | + this::newIterableCtType, |
| 129 | + this::newStreamCtType, |
| 130 | + this::newOptionalCtType, |
| 131 | + this::newOptionalIntCtType, |
| 132 | + this::newOptionalLongCtType, |
| 133 | + this::newOptionalDoubleCtType, |
| 134 | + this::newBasicCtType, |
| 135 | + this::newMapCtType, |
| 136 | + this::newSelectOptionsCtType, |
| 137 | + this::newFunctionCtType, |
| 138 | + this::newCollectorCtType, |
| 139 | + this::newReferenceCtType, |
| 140 | + this::newBiFunctionCtType, |
| 141 | + this::newBiConsumerCtType, |
| 142 | + this::newPreparedSqlCtType, |
| 143 | + this::newConfigCtType, |
| 144 | + this::newResultCtType, |
| 145 | + this::newBatchResultCtType, |
| 146 | + this::newMultiResultCtType, |
| 147 | + this::newArrayCtType); |
| 148 | + |
123 | 149 | private final RoundContext ctx; |
124 | 150 |
|
125 | 151 | public CtTypes(RoundContext ctx) { |
@@ -663,32 +689,6 @@ public CtType newCtType(TypeMirror type) { |
663 | 689 |
|
664 | 690 | private CtType newCtTypeInternal( |
665 | 691 | TypeMirror type, CtTypeVisitor<Void, Void, AptException> validator) { |
666 | | - // Apply newDomainCtType, newEmbeddableCtType and newEntityCtType functions first. |
667 | | - List<Function<TypeMirror, CtType>> functions = |
668 | | - Arrays.asList( |
669 | | - this::newDomainCtType, |
670 | | - this::newEmbeddableCtType, |
671 | | - this::newEntityCtType, |
672 | | - this::newIterableCtType, |
673 | | - this::newStreamCtType, |
674 | | - this::newOptionalCtType, |
675 | | - this::newOptionalIntCtType, |
676 | | - this::newOptionalLongCtType, |
677 | | - this::newOptionalDoubleCtType, |
678 | | - this::newBasicCtType, |
679 | | - this::newMapCtType, |
680 | | - this::newSelectOptionsCtType, |
681 | | - this::newFunctionCtType, |
682 | | - this::newCollectorCtType, |
683 | | - this::newReferenceCtType, |
684 | | - this::newBiFunctionCtType, |
685 | | - this::newBiConsumerCtType, |
686 | | - this::newPreparedSqlCtType, |
687 | | - this::newConfigCtType, |
688 | | - this::newResultCtType, |
689 | | - this::newBatchResultCtType, |
690 | | - this::newMultiResultCtType, |
691 | | - this::newArrayCtType); |
692 | 692 | CtType ctType = |
693 | 693 | functions.stream() |
694 | 694 | .map(f -> f.apply(type)) |
|
0 commit comments