com.puppycrawl.tools.checkstyle.api
Enum SeverityLevel

java.lang.Object
  extended by java.lang.Enum<SeverityLevel>
      extended by com.puppycrawl.tools.checkstyle.api.SeverityLevel
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SeverityLevel>

public enum SeverityLevel
extends java.lang.Enum<SeverityLevel>

Severity level for a check violation.

Each violation of an audit check is assigned one of the severity levels defined here.

Author:
David Schneider, Travis Schneeberger

Enum Constant Summary
ERROR
          security level error.
IGNORE
          security level ignore.
INFO
          security level info.
WARNING
          security level warning.
 
Method Summary
static SeverityLevel getInstance(java.lang.String aSecurityLevelName)
          SeverityLevel factory method.
 java.lang.String getName()
           
 java.lang.String toString()
           
static SeverityLevel valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SeverityLevel[] 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

IGNORE

public static final SeverityLevel IGNORE
security level ignore.


INFO

public static final SeverityLevel INFO
security level info.


WARNING

public static final SeverityLevel WARNING
security level warning.


ERROR

public static final SeverityLevel ERROR
security level error.

Method Detail

values

public static SeverityLevel[] 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 (SeverityLevel c : SeverityLevel.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SeverityLevel valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<SeverityLevel>

getName

public java.lang.String getName()
Returns:
the name of this severity level.

getInstance

public static SeverityLevel getInstance(java.lang.String aSecurityLevelName)
SeverityLevel factory method.

Parameters:
aSecurityLevelName - level name, such as "ignore", "info", etc.
Returns:
the SeverityLevel associated with aSecurityLevelName


Copyright © 2001-2011. All Rights Reserved.