Uses of Interface
org.springframework.aot.hint.TypeReference
Package
Description
Support classes for components that contribute generated code equivalent
to a runtime behavior.
Support for registering the need for reflection, resources, java
serialization and proxies at runtime.
-
Uses of TypeReference in org.springframework.aot.generator
-
Uses of TypeReference in org.springframework.aot.hint
Modifier and TypeClassDescriptionclass
BaseTypeReference
implementation that ensures consistent behaviour forequals()
,hashCode()
, andtoString()
based on the canonical name.Modifier and TypeMethodDescriptionTypeReference.getEnclosingType()
Return the enclosing type reference, ornull
if this type reference does not have an enclosing type.TypeHint.getReachableType()
Return the type that should be reachable for this hint to apply, ornull
if this hint should always been applied.ClassProxyHint.getTargetClass()
Return the target class of the proxy.TypeHint.getType()
Return the type that this hint handles.static TypeReference
Create an instance based on the specified type.static TypeReference
Create an instance based on the specified class name.Modifier and TypeMethodDescriptionExecutableHint.getParameterTypes()
Return the parameter types of the executable.ClassProxyHint.getProxiedInterfaces()
Return the interfaces to be proxied.JdkProxyHint.getProxiedInterfaces()
Return the interfaces to be proxied.JavaSerializationHints.types()
Return thetypes
that need to be serialized using Java serialization at runtime.Modifier and TypeMethodDescriptionReflectionHints.getTypeHint
(TypeReference type) Return the reflection hints for the type defined by the specifiedTypeReference
.static ClassProxyHint.Builder
ClassProxyHint.of
(TypeReference targetClass) Initialize a builder with the target class to use.static TypeHint.Builder
TypeHint.of
(TypeReference type) Initialize a builder for the type defined by the specifiedTypeReference
.TypeHint.Builder.onReachableType
(TypeReference reachableType) Make this hint conditional on the fact that the specified type can be resolved.ClassProxyHint.Builder.proxiedInterfaces
(TypeReference... proxiedInterfaces) Add the specified interfaces that the proxy should implement.JdkProxyHint.Builder.proxiedInterfaces
(TypeReference... proxiedInterfaces) Add the specified interfaces that the proxy should implement.ProxyHints.registerClassProxy
(TypeReference targetClass, Consumer<ClassProxyHint.Builder> classProxyHint) Register that a class proxy is required for the class defined by the specifiedTypeReference
.ProxyHints.registerJdkProxy
(TypeReference... proxiedInterfaces) Register that a JDK proxy implementing the interfaces defined by the specifiedtype references
is required.JavaSerializationHints.registerType
(TypeReference type) Register that the type defined by the specifiedTypeReference
need to be serialized using java serialization.ReflectionHints.registerType
(TypeReference type, Consumer<TypeHint.Builder> typeHint) Register or customize reflection hints for the type defined by the specifiedTypeReference
.ResourceHints.registerType
(TypeReference type) Register that the bytecode of the type defined by the specifiedTypeReference
should be made available at runtime.Modifier and TypeMethodDescriptionstatic ExecutableHint.Builder
ExecutableHint.ofConstructor
(List<TypeReference> parameterTypes) Initialize a builder with the parameter types of a constructor.static ExecutableHint.Builder
ExecutableHint.ofMethod
(String name, List<TypeReference> parameterTypes) Initialize a builder with the name and parameters types of a method.TypeHint.Builder.withConstructor
(List<TypeReference> parameterTypes, Consumer<ExecutableHint.Builder> constructorHint) Register the need for reflection on the constructor with the specified parameter types.TypeHint.Builder.withMethod
(String name, List<TypeReference> parameterTypes, Consumer<ExecutableHint.Builder> methodHint) Register the need for reflection on the method with the specified name and parameter types.