Package eu.bandm.tools.annotations
Interface PreMessage
- All Known Implementing Classes:
SimpleMessage
,SimpleMessage.Ping
,SimplePreMessage
Represent a submessage of a message or a negative result of a test.
Consists of a text and a list of arguments. The text should
include format codes which correspond to the types of the arguments.
- Since:
- 1.3
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
format()
Return the formatting of the string and its arguments.static String
format
(PreMessage pm) Executes formatting recursively.Object[]
getArgs()
Returns an access to the arguments.getText()
Return the unformatted text component.static PreMessage
preMessage
(String text, Object... args) Factory method.
-
Method Details
-
getArgs
Object[] getArgs()Returns an access to the arguments. Possibly this is not an access which allows to modify this instance.- Returns:
- an access to the arguments.
-
getText
String getText()Return the unformatted text component. -
format
Return the formatting of the string and its arguments. -
format
Executes formatting recursively. Any PreMessage contained in the arguments is formatted, and the result is used to replace a "%s
" format operand.
(Please note that translation into different languages is not supported by this simple variant.) -
preMessage
Factory method.
-