Skip to content

Java: Add common base class for SwitchStmt and SwitchExpr #3642

Open
@Marcono1234

Description

@Marcono1234

Description of the issue
Would it be possible to add a common base class for SwitchStmt and SwitchExpr?
Currently both classes define common predicates and it is often useful to find out whether a switch covers certain values, regardless of whether it is a statement or an expression.
Common predicates:

  • getACase
  • getAConstCase
  • getAStmt
  • getDefaultCase
  • getExpr
  • getStmt

Some built-in QL types and queries would likely profit from this as well (though classes like ConstSwitchStmt would have to be redesigned to extend from this new class?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    JavaquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions