Add dedicated hint support for composable annotations
This commit adds a dedicated method for annotations that are used as meta-annotation when the composed annotation does not require to be visible at runtime. Closes gh-28887
This commit is contained in:
@@ -50,6 +50,15 @@ class RuntimeHintsUtilsTests {
|
||||
assertThat(this.hints.proxies().jdkProxies()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
void registerComposableAnnotationType() {
|
||||
RuntimeHintsUtils.registerComposableAnnotation(this.hints, SampleInvoker.class);
|
||||
assertThat(this.hints.reflection().typeHints()).singleElement()
|
||||
.satisfies(annotationHint(SampleInvoker.class));
|
||||
assertThat(this.hints.proxies().jdkProxies()).singleElement()
|
||||
.satisfies(annotationProxy(SampleInvoker.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void registerAnnotationTypeWithLocalUseOfAliasForRegistersProxy() {
|
||||
RuntimeHintsUtils.registerAnnotation(this.hints, LocalMapping.class);
|
||||
|
||||
Reference in New Issue
Block a user