Package io.micronaut.inject.visitor
Interface VisitorConfiguration
-
public interface VisitorConfiguration
Allows supplying configuration to theVisitorContext
.- Since:
- 2.3.0
-
-
Field Summary
Fields Modifier and Type Field Description static VisitorConfiguration
DEFAULT
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
includeTypeLevelAnnotationsInGenericArguments()
This configures whether to include type level annotations on generic arguments when materializing the AST nodes via theElement
API.
-
-
-
Field Detail
-
DEFAULT
static final VisitorConfiguration DEFAULT
-
-
Method Detail
-
includeTypeLevelAnnotationsInGenericArguments
default boolean includeTypeLevelAnnotationsInGenericArguments()
This configures whether to include type level annotations on generic arguments when materializing the AST nodes via theElement
API.If
true
is returned then methods likeClassElement.getTypeArguments()
will include annotations declared on the classes themselves within the annotation metadata for each resultingClassElement
within the generic arguments.This can be undesirable in the use case where you need to differentiate annotations on the type arguments themselves vs annotations declared on the type, in which case you should return false.
- Returns:
- True if annotations should be included
- See Also:
ElementFactory
-
-