com.android.tools.lint.detector.api
Enum Severity

java.lang.Object
  extended by java.lang.Enum<Severity>
      extended by com.android.tools.lint.detector.api.Severity
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Severity>

@Beta
public enum Severity
extends java.lang.Enum<Severity>

Severity of an issue found by lint

NOTE: This is not a public or final API; if you rely on this be prepared to adjust your code for the next tools release.


Enum Constant Summary
ERROR
          Errors: The issue is known to be a real error that must be addressed.
FATAL
          Fatal: Use sparingly because a warning marked as fatal will be considered critical and will abort Export APK etc in ADT
IGNORE
          Ignore: The user doesn't want to see this issue
INFORMATIONAL
          Information only: Might not be a problem, but the check has found something interesting to say about the code.
WARNING
          Warning: Probably a problem.
 
Method Summary
static Severity fromName(java.lang.String name)
          Looks up the severity corresponding to a given named severity.
 java.lang.String getDescription()
          Returns a description of this severity suitable for display to the user
 java.lang.String getName()
          Returns the name of this severity
static Severity valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Severity[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FATAL

@NonNull
public static final Severity FATAL
Fatal: Use sparingly because a warning marked as fatal will be considered critical and will abort Export APK etc in ADT


ERROR

@NonNull
public static final Severity ERROR
Errors: The issue is known to be a real error that must be addressed.


WARNING

@NonNull
public static final Severity WARNING
Warning: Probably a problem.


INFORMATIONAL

@NonNull
public static final Severity INFORMATIONAL
Information only: Might not be a problem, but the check has found something interesting to say about the code.


IGNORE

@NonNull
public static final Severity IGNORE
Ignore: The user doesn't want to see this issue

Method Detail

values

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

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

valueOf

public static Severity 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

getDescription

@NonNull
public java.lang.String getDescription()
Returns a description of this severity suitable for display to the user

Returns:
a description of the severity

getName

@NonNull
public java.lang.String getName()
Returns the name of this severity


fromName

@Nullable
public static Severity fromName(@NonNull
                                         java.lang.String name)
Looks up the severity corresponding to a given named severity. The severity string should be one returned by Enum.toString()

Parameters:
name - the name to look up
Returns:
the corresponding severity, or null if it is not a valid severity name