Package org.apache.maven.message
Interface MessageBuilder
-
- All Superinterfaces:
java.lang.Appendable
public interface MessageBuilder extends java.lang.AppendableMessage builder that supports configurable styling.- Since:
- 3.10.0
- See Also:
MessageBuilderFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMessageBuilder.Constants
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default MessageBuildera(char[] value)Append content to the message buffer.default MessageBuildera(char[] value, int offset, int len)Append content to the message buffer.default MessageBuildera(java.lang.CharSequence value)Append content to the message buffer.default MessageBuildera(java.lang.CharSequence value, int start, int end)Append content to the message buffer.default MessageBuildera(java.lang.Object value)Append content to the message buffer.MessageBuilderappend(char c)MessageBuilderappend(java.lang.CharSequence cs)MessageBuilderappend(java.lang.CharSequence cs, int start, int end)java.lang.Stringbuild()Return the built message.default MessageBuilderdebug(java.lang.Object message)Append message content in debug style.default MessageBuildererror(java.lang.Object message)Append message content in error style.default MessageBuilderfailure(java.lang.Object message)Append message content in failure style.default MessageBuilderformat(java.lang.String pattern, java.lang.Object... args)Append formatted content to the buffer.default MessageBuilderinfo(java.lang.Object message)Append message content in info style.default MessageBuildermojo(java.lang.Object message)Append message content in mojo style.default MessageBuildernewline()Append newline to the message buffer.default MessageBuilderproject(java.lang.Object message)Append message content in project style.MessageBuilderresetStyle()MessageBuildersetLength(int length)Set the buffer length.default MessageBuilderstrong(java.lang.Object message)Append message content in strong style.MessageBuilderstyle(java.lang.String style)default MessageBuilderstyle(java.lang.String style, java.lang.Object message)default MessageBuildersuccess(java.lang.Object message)Append message content in success style.default MessageBuildertrace(java.lang.Object message)Append message content in trace style.default MessageBuilderwarning(java.lang.Object message)Append message content in warning style.
-
-
-
Method Detail
-
trace
default MessageBuilder trace(java.lang.Object message)
Append message content in trace style. By default, bold magenta- Parameters:
message- the message to append- Returns:
- the current builder
-
debug
default MessageBuilder debug(java.lang.Object message)
Append message content in debug style. By default, bold cyan- Parameters:
message- the message to append- Returns:
- the current builder
-
info
default MessageBuilder info(java.lang.Object message)
Append message content in info style. By default, bold blue- Parameters:
message- the message to append- Returns:
- the current builder
-
warning
default MessageBuilder warning(java.lang.Object message)
Append message content in warning style. By default, bold yellow- Parameters:
message- the message to append- Returns:
- the current builder
-
error
default MessageBuilder error(java.lang.Object message)
Append message content in error style. By default, bold red- Parameters:
message- the message to append- Returns:
- the current builder
-
success
default MessageBuilder success(java.lang.Object message)
Append message content in success style. By default, bold green- Parameters:
message- the message to append- Returns:
- the current builder
-
failure
default MessageBuilder failure(java.lang.Object message)
Append message content in failure style. By default, bold red- Parameters:
message- the message to append- Returns:
- the current builder
-
strong
default MessageBuilder strong(java.lang.Object message)
Append message content in strong style. By default, bold- Parameters:
message- the message to append- Returns:
- the current builder
-
mojo
default MessageBuilder mojo(java.lang.Object message)
Append message content in mojo style. By default, green- Parameters:
message- the message to append- Returns:
- the current builder
-
project
default MessageBuilder project(java.lang.Object message)
Append message content in project style. By default, cyan- Parameters:
message- the message to append- Returns:
- the current builder
-
style
default MessageBuilder style(java.lang.String style, java.lang.Object message)
-
style
MessageBuilder style(java.lang.String style)
-
resetStyle
MessageBuilder resetStyle()
-
append
MessageBuilder append(java.lang.CharSequence cs)
- Specified by:
appendin interfacejava.lang.Appendable
-
append
MessageBuilder append(java.lang.CharSequence cs, int start, int end)
- Specified by:
appendin interfacejava.lang.Appendable
-
append
MessageBuilder append(char c)
- Specified by:
appendin interfacejava.lang.Appendable
-
a
default MessageBuilder a(char[] value, int offset, int len)
Append content to the message buffer.- Parameters:
value- the content to appendoffset- the index of the firstcharto appendlen- the number ofchars to append- Returns:
- the current builder
-
a
default MessageBuilder a(char[] value)
Append content to the message buffer.- Parameters:
value- the content to append- Returns:
- the current builder
-
a
default MessageBuilder a(java.lang.CharSequence value, int start, int end)
Append content to the message buffer.- Parameters:
value- the content to appendstart- the starting index of the subsequence to be appendedend- the end index of the subsequence to be appended- Returns:
- the current builder
-
a
default MessageBuilder a(java.lang.CharSequence value)
Append content to the message buffer.- Parameters:
value- the content to append- Returns:
- the current builder
-
a
default MessageBuilder a(java.lang.Object value)
Append content to the message buffer.- Parameters:
value- the content to append- Returns:
- the current builder
-
newline
default MessageBuilder newline()
Append newline to the message buffer.- Returns:
- the current builder
-
format
default MessageBuilder format(java.lang.String pattern, java.lang.Object... args)
Append formatted content to the buffer.- Parameters:
pattern- a format stringargs- arguments referenced by the format specifiers in the format string- Returns:
- the current builder
- See Also:
String.format(String, Object...)
-
setLength
MessageBuilder setLength(int length)
Set the buffer length.- Parameters:
length- the new length- Returns:
- the current builder
-
build
java.lang.String build()
Return the built message.- Returns:
- the message
-
-