File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed
querydsl-tooling/querydsl-apt/src
main/java/com/querydsl/apt
test/java/com/querydsl/apt/domain/p1 Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1414package com .querydsl .apt ;
1515
1616import javax .lang .model .element .TypeElement ;
17- import javax .lang .model .type .*;
17+ import javax .lang .model .type .ArrayType ;
18+ import javax .lang .model .type .DeclaredType ;
19+ import javax .lang .model .type .ErrorType ;
20+ import javax .lang .model .type .ExecutableType ;
21+ import javax .lang .model .type .NoType ;
22+ import javax .lang .model .type .NullType ;
23+ import javax .lang .model .type .PrimitiveType ;
24+ import javax .lang .model .type .TypeVariable ;
25+ import javax .lang .model .type .WildcardType ;
1826
1927/**
2028 * {@code TypeExtractor} is a visitor implementation which extracts a concrete type from a generic
@@ -49,12 +57,13 @@ public TypeElement visitArray(ArrayType t, Void p) {
4957 public TypeElement visitDeclared (DeclaredType t , Void p ) {
5058 if (t .asElement () instanceof TypeElement ) {
5159 TypeElement typeElement = (TypeElement ) t .asElement ();
52- switch (typeElement .getKind ()) {
53- case ENUM :
60+ switch (typeElement .getKind (). name () ) {
61+ case " ENUM" :
5462 return skipEnum ? null : typeElement ;
55- case CLASS :
63+ case "RECORD" :
64+ case "CLASS" :
5665 return typeElement ;
57- case INTERFACE :
66+ case " INTERFACE" :
5867 return visitInterface (t );
5968 default :
6069 throw new IllegalArgumentException ("Illegal type: " + typeElement );
Original file line number Diff line number Diff line change 1616import com .querydsl .core .annotations .QueryEntity ;
1717
1818@ QueryEntity
19- public class SEntity1 {
20-
21- String entity1Field ;
22- }
19+ public record SEntity1 (String entity1Field ) {}
You can’t perform that action at this time.
0 commit comments