Skip to content

[java] AccessNode API changes #1307

@oowekyala

Description

@oowekyala

The purpose of AccessNode is to denote a node which can have declaration modifiers, eg abstract, final, public, etc. Some nodes implement it just to get the "final" modifier:

ASTLambdaExpression implements it for nothing, due to an implementation error: AbstractMethodLikeNode extends AbstractJavaAccessNode...

  1. I think all of these should stop implementing the interface in 7.0.0. We could have a separate base class for nodes that can be final, or implement it ad-hoc with a boolean since FormalParameter is a TypeNode and so we'd have to have several base classes. The amount of duplication seems acceptable
  2. The setters should be removed from the interface. They're only used by the parser, and could be package-private

Metadata

Metadata

Assignees

Labels

in:astAbout the AST structure or API, the parsing step

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