Skip to content

Commit 1f73f3a

Browse files
authored
Modernize processor declaration classes with Java 17+ features (#1357)
2 parents c7f7d98 + 9c353a4 commit 1f73f3a

38 files changed

+281
-294
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
.kotlin
1111
out
1212
.factorypath
13+
/.claude/settings.local.json

doma-processor/src/main/java/org/seasar/doma/internal/apt/cttype/AbstractCtType.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,33 @@
2323
import javax.lang.model.type.TypeMirror;
2424
import org.seasar.doma.internal.apt.RoundContext;
2525

26-
public abstract class AbstractCtType implements CtType {
26+
public abstract sealed class AbstractCtType implements CtType
27+
permits AggregateStrategyCtType,
28+
AnyCtType,
29+
ArrayCtType,
30+
BasicCtType,
31+
BatchResultCtType,
32+
BiConsumerCtType,
33+
BiFunctionCtType,
34+
CollectorCtType,
35+
ConfigCtType,
36+
DomainCtType,
37+
EmbeddableCtType,
38+
EntityCtType,
39+
FunctionCtType,
40+
IterableCtType,
41+
MapCtType,
42+
MultiResultCtType,
43+
NoneCtType,
44+
OptionalCtType,
45+
OptionalDoubleCtType,
46+
OptionalIntCtType,
47+
OptionalLongCtType,
48+
PreparedSqlCtType,
49+
ReferenceCtType,
50+
ResultCtType,
51+
SelectOptionsCtType,
52+
StreamCtType {
2753

2854
protected final RoundContext ctx;
2955

doma-processor/src/main/java/org/seasar/doma/internal/apt/cttype/AggregateStrategyCtType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.seasar.doma.internal.apt.annot.AggregateStrategyAnnot;
2424
import org.seasar.doma.internal.apt.generator.Code;
2525

26-
public class AggregateStrategyCtType extends AbstractCtType {
26+
public final class AggregateStrategyCtType extends AbstractCtType {
2727

2828
private final ClassName typeClassName;
2929
private final AggregateStrategyAnnot aggregateStrategyAnnot;

doma-processor/src/main/java/org/seasar/doma/internal/apt/cttype/AnyCtType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import javax.lang.model.type.TypeMirror;
1919
import org.seasar.doma.internal.apt.RoundContext;
2020

21-
public class AnyCtType extends AbstractCtType {
21+
public final class AnyCtType extends AbstractCtType {
2222

2323
AnyCtType(RoundContext ctx, TypeMirror type) {
2424
super(ctx, type);

doma-processor/src/main/java/org/seasar/doma/internal/apt/cttype/ArrayCtType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import javax.lang.model.type.TypeMirror;
2121
import org.seasar.doma.internal.apt.RoundContext;
2222

23-
public class ArrayCtType extends AbstractCtType {
23+
public final class ArrayCtType extends AbstractCtType {
2424

2525
private final CtType elementCtType;
2626

doma-processor/src/main/java/org/seasar/doma/internal/apt/cttype/BasicCtType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.seasar.doma.internal.jdbc.scalar.OptionalBasicScalarSuppliers;
2626
import org.seasar.doma.internal.wrapper.WrapperSuppliers;
2727

28-
public class BasicCtType extends AbstractCtType {
28+
public final class BasicCtType extends AbstractCtType {
2929

3030
private final TypeMirror boxedType;
3131

doma-processor/src/main/java/org/seasar/doma/internal/apt/cttype/BatchResultCtType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import javax.lang.model.type.TypeMirror;
1919
import org.seasar.doma.internal.apt.RoundContext;
2020

21-
public class BatchResultCtType extends AbstractCtType {
21+
public final class BatchResultCtType extends AbstractCtType {
2222
private final CtType elementCtType;
2323

2424
BatchResultCtType(RoundContext ctx, TypeMirror type, CtType elementCtType) {

doma-processor/src/main/java/org/seasar/doma/internal/apt/cttype/BiConsumerCtType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import javax.lang.model.type.TypeMirror;
2121
import org.seasar.doma.internal.apt.RoundContext;
2222

23-
public class BiConsumerCtType extends AbstractCtType {
23+
public final class BiConsumerCtType extends AbstractCtType {
2424

2525
private final CtType firstArgCtType;
2626

doma-processor/src/main/java/org/seasar/doma/internal/apt/cttype/BiFunctionCtType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import javax.lang.model.type.TypeMirror;
2121
import org.seasar.doma.internal.apt.RoundContext;
2222

23-
public class BiFunctionCtType extends AbstractCtType {
23+
public final class BiFunctionCtType extends AbstractCtType {
2424

2525
private final CtType firstArgCtType;
2626

doma-processor/src/main/java/org/seasar/doma/internal/apt/cttype/CollectorCtType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import javax.lang.model.type.TypeMirror;
2121
import org.seasar.doma.internal.apt.RoundContext;
2222

23-
public class CollectorCtType extends AbstractCtType {
23+
public final class CollectorCtType extends AbstractCtType {
2424

2525
private final CtType targetCtType;
2626

0 commit comments

Comments
 (0)