-
Notifications
You must be signed in to change notification settings - Fork 12
Labels
breakingBreaking ChangeBreaking ChangeenhancementNew feature or requestNew feature or requestkind/featureFeatureFeature
Description
Is your feature request related to a problem? Please describe.
codeanalyzer-java fails to generate a parse tree, symbol table, or call graph when analyzing Java code that includes record declarations. This issue affects the analysis of modern Java applications that make use of record types, introduced in Java 14 and finalized in Java 16, for immutable data structures. The missing support leads to incomplete analysis results and may cause downstream issues when performing dependency analysis or refactoring tasks.
Describe the solution you'd like
Support for record declarations should be added to codeanalyzer-java. Specifically, the tool should:
- Properly parse
recorddeclarations into the internal representation. - Consider creating a new entity for the record type.
- Ensure that
recordfields are properly registered in the symbol table. - Integrate
recordtypes with existing analyses such as type resolution and call site detection.
Describe alternatives you've considered
None. Record classes were ignored.
Additional context
- Example code that currently fails to generate a parse tree or call graph:
public record Person(String name, int age) { public String greet() { return "Hello, " + name; } }
- Expected behavior:
- The
Personrecord should appear in the symbol table. - The
greetmethod should be included in the call graph. - Implicitly generated methods should be accounted for.
- The
Metadata
Metadata
Assignees
Labels
breakingBreaking ChangeBreaking ChangeenhancementNew feature or requestNew feature or requestkind/featureFeatureFeature