edu.umd.cs.findbugs

Class I18N



  • public class I18N
    extends Object
    Singleton responsible for returning localized strings for information returned to the user.
    Author:
    David Hovemeyer
    • Field Detail

      • designationKeyComparator

        public static final Comparator<String> designationKeyComparator
        a Comparator to compare user designation keys
      • defaultLocale

        public static final Locale defaultLocale
    • Method Detail

      • instance

        public static I18N instance()
        Get the single object instance.
      • getMessage

        @Deprecated
        @Nonnull
        public String getMessage(String key)
        Deprecated. 
        Get a message string. This is a format pattern for describing an entire bug instance in a single line.
        Parameters:
        key - which message to retrieve
      • getShortMessage

        @Nonnull
        public String getShortMessage(String key)
        Get a short message string. This is a concrete string (not a format pattern) which briefly describes the type of bug, without mentioning particular a particular class/method/field.
        Parameters:
        key - which short message to retrieve
      • getDetailHTML

        @Nonnull
        public String getDetailHTML(String key)
        Get an HTML document describing the bug pattern for given key in detail.
        Parameters:
        key - which HTML details for retrieve
      • getAnnotationDescription

        public String getAnnotationDescription(String key)
        Get an annotation description string. This is a format pattern which will describe a BugAnnotation in the context of a particular bug instance. Its single format argument is the BugAnnotation.
        Parameters:
        key - the annotation description to retrieve
      • getBugTypeDescription

        @Nonnull
        public String getBugTypeDescription(String shortBugType)
        Get a description for given "bug type". FIXME: this is referred to elsewhere as the "bug code" or "bug abbrev". Should make the terminology consistent everywhere. In this case, the bug type refers to the short prefix code prepended to the long and short bug messages.
        Parameters:
        shortBugType - the short bug type code
        Returns:
        the description of that short bug type code means
      • getBugCategoryDescription

        public String getBugCategoryDescription(String category)
        Get the description of a bug category. Returns the category if no description can be found.
        Parameters:
        category - the category
        Returns:
        the description of the category
      • getUserDesignation

        public String getUserDesignation(String key)
        Get the localized user designation string. Returns the key if no user designation can be found.
        Parameters:
        key - the user designation key
        Returns:
        the localized designation string
      • getUserDesignationKeys

        public List<String> getUserDesignationKeys()
        Get a List containing all known user designation keys keys. E.g., "MOSTLY_HARMLESS", "MUST_FIX", "NOT_A_BUG", etc.
        Returns:
        List of user designation keys
      • getUserDesignationKeys

        public List<String> getUserDesignationKeys(boolean sort)
        Get a List containing all known user designation keys keys. E.g., "MOSTLY_HARMLESS", "MUST_FIX", "NOT_A_BUG", etc. If sort == true then it will attempt to sort the List as appropriate to show the user.
        Returns:
        List of user designation keys
      • getUserDesignationKey

        public String getUserDesignationKey(int index)

Copyright © 2003–2015. All rights reserved.