This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch maven-3.9.x
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/maven-3.9.x by this push:
     new cea0ef4a5b Document MessageBuilder.style and resetStyle as Maven 4 does
cea0ef4a5b is described below

commit cea0ef4a5bb05152f35c67bfddf20e531907b45d
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sat Nov 21 17:25:40 2026 +0100

    Document MessageBuilder.style and resetStyle as Maven 4 does
---
 .../apache/maven/api/services/MessageBuilder.java   | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git 
a/maven-core/src/main/java/org/apache/maven/api/services/MessageBuilder.java 
b/maven-core/src/main/java/org/apache/maven/api/services/MessageBuilder.java
index d7f125bf68..a561f81375 100644
--- a/maven-core/src/main/java/org/apache/maven/api/services/MessageBuilder.java
+++ b/maven-core/src/main/java/org/apache/maven/api/services/MessageBuilder.java
@@ -149,27 +149,48 @@ default MessageBuilder project(Object message) {
         return style("." + Constants.MAVEN_STYLE_PROJECT_NAME + ":-" + 
Constants.MAVEN_STYLE_PROJECT_DEFAULT, message);
     }
 
+    /**
+     * Append message content with the given style applied, then reset the 
style.
+     *
+     * @param style the style definition to apply
+     * @param message the message to append
+     * @return the current builder
+     */
     @Nonnull
     default MessageBuilder style(String style, Object message) {
         return style(style).a(message).resetStyle();
     }
 
+    /**
+     * Apply the given style to subsequent appended content.
+     *
+     * @param style the style definition to apply
+     * @return the current builder
+     */
     MessageBuilder style(String style);
 
+    /**
+     * Reset the current style back to the default.
+     *
+     * @return the current builder
+     */
     MessageBuilder resetStyle();
 
     //
     // message building methods modelled after Ansi methods
     //
 
+    /** {@inheritDoc} */
     @Nonnull
     @Override
     MessageBuilder append(CharSequence cs);
 
+    /** {@inheritDoc} */
     @Nonnull
     @Override
     MessageBuilder append(CharSequence cs, int start, int end);
 
+    /** {@inheritDoc} */
     @Nonnull
     @Override
     MessageBuilder append(char c);

Reply via email to