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:
  java.lang.Comparable, java.io.Serializable

public final class Scope
extends java.lang.Object
implements java.lang.Comparable, java.io.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(java.lang.Object aObject)`
`static Scope` | `getInstance(java.lang.String aScopeName)` Scope factory method.
`java.lang.String` | `getName()`
`boolean` | `isIn(Scope aScope)` Checks if this scope is a subscope of another scope.
`java.lang.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 java.lang.String toString()

  See Also:
    `Object`

### getName

    public java.lang.String getName()

  Returns:
    the name of this scope.

### compareTo

    public int compareTo(java.lang.Object aObject)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`
  See Also:
    `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(java.lang.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