com.puppycrawl.tools.checkstyle.api
Class Scope
java.lang.Object
com.puppycrawl.tools.checkstyle.api.Scope
- Comparable, Serializable
public final class Scope
extends java.lang.Object
implements Comparable, Serializable
Represents a Java visibility scope.
- Lars K?hne
ANONINNER
public static final Scope ANONINNER
anon inner scope.
NOTHING
public static final Scope NOTHING
nothing scope.
PACKAGE
public static final Scope PACKAGE
package scope.
PRIVATE
public static final Scope PRIVATE
private scope.
PROTECTED
public static final Scope PROTECTED
protected scope.
PUBLIC
public static final Scope PUBLIC
public scope.
compareTo
public int compareTo(Object aObject)
Comparable
getInstance
public static Scope getInstance(String aScopeName)
Scope factory method.
aScopeName
- scope name, such as "nothing", "public", etc.
- the
Scope
associated with aScopeName
getName
public String getName()
- the name of this scope.
isIn
public boolean isIn(Scope aScope)
Checks if this scope is a subscope of another scope.
Example: PUBLIC is a subscope of PRIVATE.
aScope
- a Scope
value
- if
this
is a subscope of aScope
.
toString
public String toString()
Object