Enum ScopeInfo
- java.lang.Object
-
- java.lang.Enum<ScopeInfo>
-
- net.sourceforge.pmd.lang.java.symbols.table.ScopeInfo
-
- All Implemented Interfaces:
Serializable
,Comparable<ScopeInfo>
public enum ScopeInfo extends Enum<ScopeInfo>
A scope tag for java shadow chains. This gives information about why a declaration is in scope.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ENCLOSING_TYPE
An enclosing class.ENCLOSING_TYPE_MEMBER
Member of an enclosing class, that is not inherited.FORMAL_PARAM
Method or constructor formal parameter (lambdas are treated as locals).IMPORT_ON_DEMAND
INHERITED
Inherited by some enclosing class.JAVA_LANG
LOCAL
Local var, including lambda parameters and catch parameters.METHOD_MEMBER
This mergesENCLOSING_TYPE_MEMBER
andINHERITED
.SAME_FILE
Sibling types in the same file, that are not nested into one another.SAME_PACKAGE
SINGLE_IMPORT
TYPE_PARAM
A type parameter of some enclosing class.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ScopeInfo
valueOf(String name)
Returns the enum constant of this type with the specified name.static ScopeInfo[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ENCLOSING_TYPE
public static final ScopeInfo ENCLOSING_TYPE
An enclosing class.
-
ENCLOSING_TYPE_MEMBER
public static final ScopeInfo ENCLOSING_TYPE_MEMBER
Member of an enclosing class, that is not inherited.
-
INHERITED
public static final ScopeInfo INHERITED
Inherited by some enclosing class.
-
METHOD_MEMBER
public static final ScopeInfo METHOD_MEMBER
This mergesENCLOSING_TYPE_MEMBER
andINHERITED
.
-
TYPE_PARAM
public static final ScopeInfo TYPE_PARAM
A type parameter of some enclosing class.
-
LOCAL
public static final ScopeInfo LOCAL
Local var, including lambda parameters and catch parameters.
-
IMPORT_ON_DEMAND
public static final ScopeInfo IMPORT_ON_DEMAND
-
SAME_PACKAGE
public static final ScopeInfo SAME_PACKAGE
-
JAVA_LANG
public static final ScopeInfo JAVA_LANG
-
SINGLE_IMPORT
public static final ScopeInfo SINGLE_IMPORT
-
SAME_FILE
public static final ScopeInfo SAME_FILE
Sibling types in the same file, that are not nested into one another.
-
FORMAL_PARAM
public static final ScopeInfo FORMAL_PARAM
Method or constructor formal parameter (lambdas are treated as locals).
-
-
Method Detail
-
values
public static ScopeInfo[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ScopeInfo c : ScopeInfo.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ScopeInfo valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-