Browse Source

Restore ANNOTATION_HINT in a deprecated form for the time being

pull/28961/head
Stephane Nicoll 4 years ago
parent
commit
f4389c3114
  1. 14
      spring-core/src/main/java/org/springframework/aot/hint/support/RuntimeHintsUtils.java

14
spring-core/src/main/java/org/springframework/aot/hint/support/RuntimeHintsUtils.java

@ -16,7 +16,12 @@ @@ -16,7 +16,12 @@
package org.springframework.aot.hint.support;
import java.util.function.Consumer;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.TypeHint;
import org.springframework.aot.hint.TypeHint.Builder;
import org.springframework.core.annotation.AliasFor;
import org.springframework.core.annotation.MergedAnnotation;
import org.springframework.core.annotation.SynthesizedAnnotation;
@ -30,6 +35,15 @@ import org.springframework.core.annotation.SynthesizedAnnotation; @@ -30,6 +35,15 @@ import org.springframework.core.annotation.SynthesizedAnnotation;
*/
public abstract class RuntimeHintsUtils {
/**
* A {@link TypeHint} customizer suitable for an annotation. Make sure
* that its attributes are visible.
* @deprecated as annotation attributes are visible without additional hints
*/
@Deprecated
public static final Consumer<Builder> ANNOTATION_HINT = hint ->
hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS);
/**
* Register the necessary hints so that the specified annotation is visible
* at runtime.

Loading…
Cancel
Save