Enum Constant and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
static Severity |
fromLintOptionSeverity(int severity)
Returns a severity corresponding to the various
LintOptions severity
constants |
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
|
boolean |
isError()
Returns true if this severity is at least an error
|
static Severity |
max(Severity severity1,
Severity severity2)
Returns the largest / most severe of the two given severities
|
static Severity |
min(Severity severity1,
Severity severity2)
Returns the smallest / least severe of the two given severities
|
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.
|
@NonNull public static final Severity FATAL
@NonNull public static final Severity ERROR
@NonNull public static final Severity WARNING
@NonNull public static final Severity INFORMATIONAL
@NonNull public static final Severity IGNORE
public static Severity[] values()
for (Severity c : Severity.values()) System.out.println(c);
public static Severity 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 namejava.lang.NullPointerException
- if the argument is null@NonNull public java.lang.String getDescription()
@NonNull public java.lang.String getName()
@Nullable public static Severity fromName(@NonNull java.lang.String name)
Enum.toString()
name
- the name to look up@NonNull public static Severity fromLintOptionSeverity(int severity)
LintOptions
severity
constantsseverity
- the LintOptions
severity constant, such as LintOptions.SEVERITY_FATAL
@NonNull public static Severity min(@NonNull Severity severity1, @NonNull Severity severity2)
severity1
- the first severity to compareseverity2
- the second severity to compare@NonNull public static Severity max(@NonNull Severity severity1, @NonNull Severity severity2)
severity1
- the first severity to compareseverity2
- the second severity to comparepublic boolean isError()