vy commented on code in PR #4116:
URL: https://github.com/apache/logging-log4j2/pull/4116#discussion_r3773993478
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ScriptComponentBuilder.java:
##########
@@ -16,8 +16,44 @@
*/
package org.apache.logging.log4j.core.config.builder.api;
+import org.apache.logging.log4j.core.script.Script;
+import org.jspecify.annotations.Nullable;
+
/**
- * Assembler for constructing Layout Components.
+ * A builder interface for constructing and configuring {@link Script}
components in a Log4j configuration.
+ *
+ * <p>
+ * Instances of this builder are designed for single-threaded use and are
not thread-safe. Developers
+ * should avoid sharing instances between threads.
+ * </p>
+ *
* @since 2.5
*/
-public interface ScriptComponentBuilder extends
ComponentBuilder<ScriptComponentBuilder> {}
+public interface ScriptComponentBuilder extends
ComponentBuilder<ScriptComponentBuilder> {
+
+ /**
+ * Sets the 'language' attribute on the script component.
+ * <p>
+ * If the given {@code language} argument is {@code} the attribute will
be removed (if present).
+ * </p>
+ *
+ * @param language the script language
+ * @return this builder (for chaining)
+ */
+ default ScriptComponentBuilder setLanguage(final @Nullable String
language) {
Review Comment:
Don't we need `@since` tags for all these new methods?
Note that this comment applies to all touched API classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]