Skip to content

Refactoring of Scope class in API #3511

@romani

Description

@romani

scopes - https://docs.oracle.com/javase/specs/jls/se8/html/jls-6.html#jls-6.3
"public, protected, and private" are called as "access modifiers" - https://docs.oracle.com/javase/specs/jls/se8/html/jls-6.html#jls-6.6

https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/api/Scope.java

contains "access modifiers" and scope level (anoninner).
Two separate terms are in one class ....... and even in API class ... .

scope - http://checkstyle.sourceforge.net/property_types.html#scope
Scope was added at far history, 17d3b31

TODO:

  1. break API and make new enum/class - AccessModifier . That have only access modifiers.
  2. Scope should be moved our of API and contain anoninner only. It might be used for other scopes in future or removed completely from sources to be util method booelan isInAnnoiousInnerClass(ast)

issue is good candidate for checkstyle8 version.

usage of Scope enum:
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions