Enum FixedCode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FixedCode>, ReportCode

    public enum FixedCode
    extends java.lang.Enum<FixedCode>
    implements ReportCode
    Enumerates known ReportCode instances. A short description is provided for each instance. Note the description is not definitive, the actual message passed through the reporting system in association with the code is the one that should actually be passed to the user.

    This class exists for taplint clients that want to have a static idea of the ReportCode instances that may be reported by the taplint framework. Note it does not provide a complete list of all the ReportCodes, since other ReportCode sublclasses may be used. But it is expected to be the large majority.

    The name of each enum element has a fixed form, T_LLLL, where T is code.getType().getChar() and LLLL is code.getLabel().

    Since:
    11 Jun 2014
    Author:
    Mark Taylor
    • Method Detail

      • values

        public static FixedCode[] 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 (FixedCode c : FixedCode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FixedCode 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
      • getLabel

        public java.lang.String getLabel()
        Description copied from interface: ReportCode
        Returns the 4-character label of this code.
        Specified by:
        getLabel in interface ReportCode
        Returns:
        4-character label
      • getDescription

        public java.lang.String getDescription()
        Returns a short textual description of the use of this code. It may not be very precise; if the message put through the reporting system is available, that should be used in preference.
        Returns:
        description