public class FindBugsMessageFormat
extends java.lang.Object
java.text.MessageFormat; however, each placeholder may have
an optional "key" which specifies how the object at that position should be
formatted.
Example:
new FindBugsMessageFormat("BUG: {1} does something bad to field {2.fullField}")
In this example, the method annotation at position 1 is formatted using the
empty (default) key. The field annotation at position 2 is formatted using
the "fullField" key, which uses the long format for the field rather than the
usual "class.fieldname" format.BugInstance| Constructor | Description |
|---|---|
FindBugsMessageFormat(java.lang.String pattern) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
format(BugAnnotation[] args,
ClassAnnotation primaryClass) |
|
java.lang.String |
format(BugAnnotation[] args,
ClassAnnotation primaryClass,
boolean abridgedMessages) |
Format the message using the given array of BugAnnotations as arguments
to bind to the placeholders in the pattern string.
|
public FindBugsMessageFormat(java.lang.String pattern)
pattern - the pattern for the messagepublic java.lang.String format(BugAnnotation[] args, ClassAnnotation primaryClass)
public java.lang.String format(BugAnnotation[] args, ClassAnnotation primaryClass, boolean abridgedMessages)
args - the BugAnnotations used as argumentsprimaryClass - TODOFindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.