Package edu.hm.hafner.analysis
Class Categories
java.lang.Object
edu.hm.hafner.analysis.Categories
Provides convenience methods to detect categories.
- Author:
- Ullrich Hafner
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringguessCategory(String message) Classifies the warning message: tries to guess a category from the warning message.static StringguessCategoryIfEmpty(String category, String message) Returns a category for the current warning.
-
Field Details
-
DEPRECATION
Category for warnings due to usage of deprecate API.- See Also:
-
PROPRIETARY_API
Category for warnings due to the usage of proprietary API.- See Also:
-
JAVADOC
Category for Javadoc warnings.- See Also:
-
OTHER
Category for Other warnings.- See Also:
-
-
Method Details
-
guessCategory
Classifies the warning message: tries to guess a category from the warning message.- Parameters:
message- the message to check- Returns:
- warning category, empty string if unknown
-
guessCategoryIfEmpty
public static String guessCategoryIfEmpty(@CheckForNull String category, @CheckForNull String message) Returns a category for the current warning. If the provided category is not empty, then a capitalized string is returned. Otherwise the category is obtained from the specified message text.- Parameters:
category- the warning category (might be empty)message- the warning message- Returns:
- the actual category
-