Reformatted

This commit is contained in:
Finn
2026-01-16 21:53:46 +01:00
parent 2a657f3a83
commit 1e95252f94
18 changed files with 155 additions and 151 deletions

View File

@@ -4,18 +4,28 @@ package org.openautonomousconnection.luascript.hosts;
* Host capability for console logging.
*/
public interface ConsoleHost {
/** @param message message */
/**
* @param message message
*/
void info(String message);
/** @param message message */
/**
* @param message message
*/
void log(String message);
/** @param message message */
/**
* @param message message
*/
void warn(String message);
/** @param message message */
/**
* @param message message
*/
void error(String message);
/** @param message message */
/**
* @param message message
*/
void exception(String message);
}

View File

@@ -45,7 +45,7 @@ public interface DomHost {
* Sets the text content of an element.
*
* @param elementId element id
* @param text text
* @param text text
*/
void setTextContent(String elementId, String text);
@@ -53,7 +53,7 @@ public interface DomHost {
* Gets a single attribute or null if missing.
*
* @param elementId element id
* @param name attribute name
* @param name attribute name
* @return value or null
*/
String getAttribute(String elementId, String name);
@@ -62,8 +62,8 @@ public interface DomHost {
* Sets an attribute (creates it if missing).
*
* @param elementId element id
* @param name attribute name
* @param value attribute value
* @param name attribute name
* @param value attribute value
*/
void setAttribute(String elementId, String name, String value);
@@ -71,7 +71,7 @@ public interface DomHost {
* Removes an attribute.
*
* @param elementId element id
* @param name attribute name
* @param name attribute name
*/
void removeAttribute(String elementId, String name);
@@ -94,7 +94,7 @@ public interface DomHost {
/**
* Creates a new element (detached) and returns its id.
*
* @param tagName tag name
* @param tagName tag name
* @param requestedId optional requested id, may be null/blank for auto id
* @return created element id
*/
@@ -111,15 +111,15 @@ public interface DomHost {
* Moves/appends child under parent.
*
* @param parentId parent id
* @param childId child id
* @param childId child id
*/
void appendChild(String parentId, String childId);
/**
* Inserts child before an existing direct child.
*
* @param parentId parent id
* @param childId child id
* @param parentId parent id
* @param childId child id
* @param beforeChildId existing child id
*/
void insertBefore(String parentId, String childId, String beforeChildId);

View File

@@ -24,6 +24,13 @@ public final class HostServices {
this.resources = b.resources;
}
/**
* @return builder
*/
public static Builder builder() {
return new Builder();
}
/**
* @return optional DomHost capability
*/
@@ -45,21 +52,20 @@ public final class HostServices {
return Optional.ofNullable(resources);
}
/** @return optional console host */
/**
* @return optional console host
*/
public Optional<ConsoleHost> console() {
return Optional.ofNullable(console);
}
/** @return optional ui host */
/**
* @return optional ui host
*/
public Optional<UiHost> ui() {
return Optional.ofNullable(ui);
}
/** @return builder */
public static Builder builder() {
return new Builder();
}
/**
* Builder for HostServices.
*/