Skip to content

[java] Expose annotations in symbol API #3752

@oowekyala

Description

@oowekyala

The class files and ASM give us access to annotations. The "hard" part of this feature, is that we need a way to represent annotation values symbolically. This adds significant API surface to the symbol API and it should probably stay @Experimental when PMD 7 is released.

Another complication is that the annotation values are easy to parse with ASM, but for symbols based on the AST, resolving those values requires name resolution. This introduces a dependency cycle between the name resolution and the symbol resolution pass. The cycle can be broken by resolving annotations lazily.

Branch: I think this one. I don't think ast-based annotations are supported yet in this branch.

This issue was split off from #2701

Metadata

Metadata

Assignees

No one assigned

    Labels

    an:enhancementAn improvement on existing features / rulesin:symbol-tableAffects the symbol table code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions