Class FindBugsMessages
- java.lang.Object
-
- edu.hm.hafner.analysis.parser.findbugs.FindBugsMessages
-
public final class FindBugsMessages extends Object
Parses the FindBugs pattern descriptions and provides access to these HTML messages.- Author:
- Ullrich Hafner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFindBugsMessages.PatternBug pattern describing a bug type.
-
Constructor Summary
Constructors Constructor Description FindBugsMessages()Loads the available rules into a map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage(String name)Returns a HTML description for the specified bug.StringgetShortMessage(String name)Returns a short description for the specified bug.List<FindBugsMessages.Pattern>parse(InputStream file)Parses the FindBugs pattern description.intsize()Returns the size of this messages cache.
-
-
-
Method Detail
-
parse
public List<FindBugsMessages.Pattern> parse(InputStream file) throws IOException, SAXException
Parses the FindBugs pattern description.- Parameters:
file- XML file with the messages- Returns:
- a list of parsed patterns
- Throws:
SAXException- if we can't parse the fileIOException- if we can't read the file
-
getMessage
public String getMessage(String name)
Returns a HTML description for the specified bug.- Parameters:
name- name of the bug- Returns:
- a HTML description
-
getShortMessage
public String getShortMessage(String name)
Returns a short description for the specified bug.- Parameters:
name- name of the bug- Returns:
- a HTML description for the specified bug.
-
size
public int size()
Returns the size of this messages cache.- Returns:
- the number of stored messages (English locale)
-
-