Class ReflectionIntrospectionConfiguration
java.lang.Object
io.micronaut.reflection.ReflectionIntrospectionConfiguration
@Context
@Internal
@ConfigurationProperties("micronaut.introspection")
public final class ReflectionIntrospectionConfiguration
extends Object
Applies the "micronaut.introspection.allow-reflection" property of the application
configuration to the
ReflectionIntrospectionPolicy when the context starts, and takes it back when
the context closes, leaving the patterns of the contexts that are still running.
The property allows types; ReflectionIntrospectionConfiguration.Description both allows them and says how they are to be described,
carrying the Introspected members a type that cannot be annotated - one of a library, one compiled
without the processor - would otherwise have no way to declare:
micronaut:
introspection:
reflective:
- types: com.example.model.*
access-kind: FIELD
visibility: ANY
excludes: password
- types: com.example.api.*
included-annotations: com.fasterxml.jackson.annotation.JsonProperty
indexed:
- annotation: com.fasterxml.jackson.annotation.JsonProperty
member: value
- Since:
- 5.2.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe types matching a set of patterns, and theIntrospectedmembers the shared introspector describes them with. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReflectionIntrospectionConfiguration(@Nullable List<ReflectionIntrospectionConfiguration.Description> reflective) Creates the configuration; it is instantiated by the context. -
Method Summary
Modifier and TypeMethodDescriptionThe patterns of the types the shared introspector may describe reflectively.The types to describe reflectively, and the annotations to describe them with.voidsetAllowReflection(@Nullable List<String> allowReflection) The patterns of the types the sharedBeanIntrospectormay describe reflectively when it has no generated introspection for them.
-
Field Details
-
PREFIX
-
-
Constructor Details
-
ReflectionIntrospectionConfiguration
public ReflectionIntrospectionConfiguration(@Nullable List<ReflectionIntrospectionConfiguration.Description> reflective) Creates the configuration; it is instantiated by the context.- Parameters:
reflective- The types to describe reflectively, and how
-
-
Method Details
-
getAllowReflection
-
setAllowReflection
The patterns of the types the sharedBeanIntrospectormay describe reflectively when it has no generated introspection for them. A pattern is a class name where*stands for any sequence of characters:com.example.model.*allows a package and its sub packages. No type is allowed by default.- Parameters:
allowReflection- The patterns
-
getReflective
The types to describe reflectively, and the annotations to describe them with.- Returns:
- The descriptions
-