com.puppycrawl.tools.checkstyle.api
Class Scope
- Comparable, Serializable
public final class Scope
implements Comparable, Serializable
Represents a Java visibility scope.
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)
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()
isIn
public boolean isIn(Scope aScope)
Checks if this scope is a subscope of another scope.
Example: PUBLIC is a subscope of PRIVATE.
- if
this
is a subscope of aScope
.
toString
public String toString()