Package com.sun.identity.shared.debug
Enum DebugLevel
- java.lang.Object
-
- java.lang.Enum<DebugLevel>
-
- com.sun.identity.shared.debug.DebugLevel
-
- All Implemented Interfaces:
Serializable
,Comparable<DebugLevel>
public enum DebugLevel extends Enum<DebugLevel>
Debug level enum
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ERROR
flags the state where error debugging is enabled.MESSAGE
This state enables debugging of messages, warnings and errors.OFF
flags the disabled debug state.ON
flags the enabled debug state for warnings, errors and messages.WARNING
flags the state where warning debugging is enabled, but message debugging is disabled.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareLevel(DebugLevel o)
Compares the debug level with the specified debug for order.static DebugLevel
fromLevel(int strLevel)
Get Debug level from its namestatic DebugLevel
fromName(String strName)
Get Debug level from its nameint
getLevel()
Get level that can be used for level comparisonString
getName()
Get Name associated with this debug levelString
toString()
static DebugLevel
valueOf(String name)
Returns the enum constant of this type with the specified name.static DebugLevel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OFF
public static final DebugLevel OFF
flags the disabled debug state.
-
ERROR
public static final DebugLevel ERROR
flags the state where error debugging is enabled. When debugging is set to less thanERROR
, error debugging is also disabled.
-
WARNING
public static final DebugLevel WARNING
flags the state where warning debugging is enabled, but message debugging is disabled. When debugging is set to less thanWARNING
, warning debugging is also disabled.
-
MESSAGE
public static final DebugLevel MESSAGE
This state enables debugging of messages, warnings and errors.
-
ON
public static final DebugLevel ON
flags the enabled debug state for warnings, errors and messages. Printing to a file is disabled. All printing is done on System.out.
-
-
Method Detail
-
values
public static DebugLevel[] 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 (DebugLevel c : DebugLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DebugLevel 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
-
fromName
public static DebugLevel fromName(String strName)
Get Debug level from its name- Parameters:
strName
- name in string- Returns:
- debug level associated to this name
- Throws:
IllegalArgumentException
- if no debug names are associated to this name, an illegal argument exception is throw
-
fromLevel
public static DebugLevel fromLevel(int strLevel) throws InvalidParameterException
Get Debug level from its name- Parameters:
strLevel
- level in string- Returns:
- debug level associated to this level
- Throws:
IllegalArgumentException
- if no debug names are associated to this level, an illegal argument exception is throwInvalidParameterException
-
getLevel
public int getLevel()
Get level that can be used for level comparison- Returns:
- level number
-
getName
public String getName()
Get Name associated with this debug level- Returns:
- name
-
compareLevel
public int compareLevel(DebugLevel o)
Compares the debug level with the specified debug for order. Returns a negative integer, zero, or a positive integer as this level is less than, equal to, or greater than the specified object.- Parameters:
o
- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-
toString
public String toString()
- Overrides:
toString
in classEnum<DebugLevel>
-
-