Skip to content

[apex] AST cleanups #4311

@adangel

Description

@adangel
  • make ApexNode.getNode() package-private
  • On ASTLiteralExpression.getLiteralType(), we expose a Jorje-internal Enum. Using this, makes the rule again dependent on jorje. Same with ASTBooleanExpression.getOperator(). This has been done by [apex] Remove Jorje leaks outside ast package #4081 and [visualforce] Replace uses of Jorje types in pmd-visualforce #4226 on PMD6
  • the class apex.rule.security.Helper provides many utility methods for generating a fully qualified name of variables, fields, methods. They use the format "<defining_type>:".
    I'm wondering, whether this actually works here in PMD, if Class A references Class B,
    but we let parse the files separately. I guess, the parser then doesn't resolve this?
  • Expose the "definingType" on the AbstractApexNode: Each jorje node has a reference to its
    defining type, which holds information about the compilation unit name.
  • AnnotationSuppressionUtil, similar like [java] Refactor annotation suppression #1927, since CanSuppressWarnings is deprecated.

Metadata

Metadata

Assignees

No one assigned

    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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions