com.cflint.Levels Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of CFLint Show documentation
Show all versions of CFLint Show documentation
A static code analysis tool for ColdFusion (in the spirit of FindBugs and Lint). With CFLint, you are able to analyze your ColdFusion code base for code violations.
package com.cflint;
public enum Levels {
FATAL("FATAL"),
CRITICAL("CRITICAL"),
ERROR("ERROR"),
WARNING("WARNING"),
CAUTION("CAUTION"),
INFO("INFO"),
COSMETIC("COSMETIC"),
UNKNOWN("UNKNOWN");
private final String severity;
private Levels(final String name) {
severity = name;
}
@Override
public String toString() {
if (severity == null || this == UNKNOWN) {
return "";
}
return this.severity;
}
public static Levels fromString(final String severity) {
for (Levels level : Levels.values()) {
if (level.toString().equals(severity)) {
return level;
}
}
return UNKNOWN;
}
}