All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cflint.Levels Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 1.5.0
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy