|
23 | 23 | import org.springframework.aot.generate.GenerationContext;
|
24 | 24 | import org.springframework.aot.hint.MemberCategory;
|
25 | 25 | import org.springframework.core.annotation.MergedAnnotation;
|
26 |
| -import org.springframework.core.annotation.SynthesizedAnnotation; |
27 | 26 |
|
28 | 27 | /**
|
29 | 28 | * @author Christoph Strobl
|
@@ -51,32 +50,30 @@ public static void contribute(Class<?> type, GenerationContext contribution) {
|
51 | 50 | * @param contribution
|
52 | 51 | */
|
53 | 52 | @SuppressWarnings("unchecked")
|
54 |
| - public static void contribute(Class<?> type, Predicate<Class<? extends Annotation>> filter, GenerationContext contribution) { |
| 53 | + public static void contribute(Class<?> type, Predicate<Class<? extends Annotation>> filter, |
| 54 | + GenerationContext contribution) { |
55 | 55 |
|
56 | 56 | if (type.isPrimitive()) {
|
57 | 57 | return;
|
58 | 58 | }
|
59 | 59 |
|
60 | 60 | if (type.isAnnotation() && filter.test((Class<? extends Annotation>) type)) {
|
61 | 61 |
|
62 |
| - contribution.getRuntimeHints().reflection().registerType(type, hint -> |
63 |
| - hint.withMembers(MemberCategory.INTROSPECT_PUBLIC_METHODS)); |
| 62 | + contribution.getRuntimeHints().reflection().registerType(type, |
| 63 | + hint -> hint.withMembers(MemberCategory.INTROSPECT_PUBLIC_METHODS)); |
64 | 64 |
|
65 |
| - // TODO: do we need this if meta annotated with SD annotation? |
66 |
| - if (type.getPackage().getName().startsWith(DATA_NAMESPACE)) { |
67 |
| - contribution.getRuntimeHints().proxies().registerJdkProxy(type, SynthesizedAnnotation.class); |
68 |
| - } |
69 | 65 | return;
|
70 | 66 | }
|
71 | 67 |
|
72 | 68 | if (type.isInterface()) {
|
73 |
| - contribution.getRuntimeHints().reflection().registerType(type, hint -> |
74 |
| - hint.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS)); |
| 69 | + contribution.getRuntimeHints().reflection().registerType(type, |
| 70 | + hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS)); |
75 | 71 | return;
|
76 | 72 | }
|
77 | 73 |
|
78 |
| - contribution.getRuntimeHints().reflection().registerType(type, hint -> |
79 |
| - hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.DECLARED_FIELDS)); |
| 74 | + contribution.getRuntimeHints().reflection().registerType(type, |
| 75 | + hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_METHODS, |
| 76 | + MemberCategory.DECLARED_FIELDS)); |
80 | 77 | }
|
81 | 78 |
|
82 | 79 | /**
|
|
0 commit comments