|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<RulePriority>
net.sourceforge.pmd.RulePriority
public enum RulePriority
These are the possible Rule priority values.
For backward compatibility, priorities range in value from 1 to 5, with 5
being the lowest priority. This means the ordinal value of the Enum should be
avoided in favor of getPriority()
and
valueOf(int)
Enum Constant Summary | |
---|---|
HIGH
High: Change absolutely required. |
|
LOW
Low: Change highly optional. |
|
MEDIUM
Medium: Change recommended. |
|
MEDIUM_HIGH
Medium to high: Change highly recommended. |
|
MEDIUM_LOW
Medium to low: Change optional. |
Method Summary | |
---|---|
java.lang.String |
getName()
Get the descriptive name of this priority. |
int |
getPriority()
Get the priority value as a number. |
java.lang.String |
toString()
Returns the descriptive name of the priority. |
static RulePriority |
valueOf(int priority)
Get the priority which corresponds to the given number as returned by getPriority() . |
static RulePriority |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static RulePriority[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final RulePriority HIGH
public static final RulePriority MEDIUM_HIGH
public static final RulePriority MEDIUM
public static final RulePriority MEDIUM_LOW
public static final RulePriority LOW
Method Detail |
---|
public static RulePriority[] values()
for (RulePriority c : RulePriority.values()) System.out.println(c);
public static RulePriority valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic int getPriority()
int
value of the priority.public java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Enum<RulePriority>
getName()
public static RulePriority valueOf(int priority)
getPriority()
. If the number is an invalid value,
then LOW
will be returned.
priority
- The numeric priority value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |