improve wrapper and general structure #16

Merged
tueem merged 23 commits from improve/structure into dev 2025-03-17 08:26:44 +00:00
Showing only changes of commit d4a91f3251 - Show all commits

View File

@ -40,11 +40,12 @@ public class InteractionRegistry {
for (Method method : interactionHandler.getClass().getMethods()) {
InteractionMethod iMethod = InteractionMethod.create(method, interactionHandler, marinara);
if (iMethod != null) {
Optional<InteractionEntry> entry = this.interactions.stream().filter(iMethod::equals).findFirst();
if (entry.isEmpty()) {
interactions.add(new InteractionEntry(iMethod.identifier()).addMethod(iMethod));
}else
entry.get().addMethod(iMethod);
Optional<InteractionEntry> oentry = this.interactions.stream()
.filter(i -> i.identifier().equals(iMethod.identifier()))
.findFirst();
InteractionEntry entry = oentry.orElse(new InteractionEntry(iMethod.identifier())).addMethod(iMethod);
if (oentry.isEmpty()) this.interactions.add(entry);
logger.debug("Added {} method from {}", iMethod.method().getName(), interactionHandler.getClass().getSimpleName());
}
}