Interface VisitorConfiguration


  • public interface VisitorConfiguration
    Allows supplying configuration to the VisitorContext.
    Since:
    2.3.0
    • Method Detail

      • includeTypeLevelAnnotationsInGenericArguments

        default boolean includeTypeLevelAnnotationsInGenericArguments()
        This configures whether to include type level annotations on generic arguments when materializing the AST nodes via the Element API.

        If true is returned then methods like ClassElement.getTypeArguments() will include annotations declared on the classes themselves within the annotation metadata for each resulting ClassElement 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