Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.puppycrawl.tools.checkstyle.api
Class Scope

    java.lang.Object
      com.puppycrawl.tools.checkstyle.api.Scope

All Implemented Interfaces:
  Serializable, Comparable

    public final class Scope

extends Object
implements Comparable, Serializable

Represents a Java visibility scope.

Author:
  Lars Kühne
See Also:
  Serialized Form

Field Summary
`static Scope` | `ANONINNER` anon inner scope.
`static Scope` | `NOTHING` nothing scope.
`static Scope` | `PACKAGE` package scope.
`static Scope` | `PRIVATE` private scope.
`static Scope` | `PROTECTED` protected scope.
`static Scope` | `PUBLIC` public scope.

Method Summary
`int` | `compareTo(Object aObject)`
`static Scope` | `getInstance(String aScopeName)` Scope factory method.
`String` | `getName()`
`boolean` | `isIn(Scope aScope)` Checks if this scope is a subscope of another scope.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### NOTHING

    public static final Scope NOTHING

  nothing scope.

### PUBLIC

    public static final Scope PUBLIC

  public scope.

### PROTECTED

    public static final Scope PROTECTED

  protected scope.

### PACKAGE

    public static final Scope PACKAGE

  package scope.

### PRIVATE

    public static final Scope PRIVATE

  private scope.

### ANONINNER

    public static final Scope ANONINNER

  anon inner scope.

Method Detail

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getName

    public String getName()

  Returns:
    the name of this scope.

### compareTo

    public int compareTo(Object aObject)

  Specified by:
    `compareTo` in interface `Comparable`

### isIn

    public boolean isIn(Scope aScope)

  Checks if this scope is a subscope of another scope. Example: PUBLIC is a subscope of PRIVATE.

  Parameters:
    `aScope` - a `Scope` value
  Returns:
    if `this` is a subscope of `aScope`.

### getInstance

    public static Scope getInstance(String aScopeName)

  Scope factory method.

  Parameters:
    `aScopeName` - scope name, such as "nothing", "public", etc.
  Returns:
    the `Scope` associated with `aScopeName`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

Back to the Checkstyle Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD