Runner

  
Type🔵 Class
Packageio.github.mrtesz.teszcore.logged
GitHubRunner.java
ImplementsCopyable<Runner>

Description

Utility class for running <abbr title=java.lang.Runnable>Runnable</abbr>s and <abbr title=java.util.function.Supplier>Supplier</abbr>s with wrapping logging


Constructor

Runner(String usingProject);
Runner(String usingProject, TeszCoreLogger logger);
ParameterTypeAnnotationsDescription
usingProjectString@NullableThe name of the project, using the Runner
loggerTeszCoreLogger@NotNull(optional) Logger, the messages are sent in. Default: Logger at level 5

Methods

executeSupply

static <T> T executeSupply(Supplier<T> supplier, String extraInfo, String usingProject, TeszCoreLogger logger);
static <T> T executeSupply(Supplier<T> supplier, String extraInfo, String usingProject);
static <T> T executeSupply(Supplier<T> supplier, String extraInfo);
static <T> T executeSupply(Supplier<T> supplier);

Execute a <abbr title=java.util.function.Supplier>Supplier</abbr> with wrapping logging

ParameterTypeAnnotationsDescription
supplierSupplier<T>@NotNullThe Supplier to execute
extraInfoString@Nullable(optional) Extra infos (for logging)
usingProjectString@Nullable(optional) The name of the project, using the Runner
loggerTeszCoreLogger@NotNull(optional) The logger, the messages are logged in

executeSupply

static void executeRunnable(Runnable runnable, String extraInfo, String usingProject, TeszCoreLogger logger);
static void executeRunnable(Runnable runnable, String extraInfo, String usingProject);
static void executeRunnable(Runnable runnable, String extraInfo);
static void executeRunnable(Runnable runnable);

Run a <abbr title=java.lang.Runnable>Runnable</abbr> with wrapping logging

ParameterTypeAnnotationsDescription
runnableRunnable@NotNullThe Runnable to execute
extraInfoString@Nullable(optional) Extra infos (for logging)
usingProjectString@Nullable(optional) The name of the project, using the Runner
loggerTeszCoreLogger@NotNull(optional) The logger, the messages are logged in

get

<T> T get(Supplier<T> supplier, String extraInfo);
<T> T get(Supplier<T> supplier);

See #executeSupply

ParameterTypeAnnotationsDescription
supplierSupplier<T>@NotNullThe Supplier to execute
extraInfoString@Nullable(optional) Extra infos (for logging)

Returns: T — the supplied value


get

void run(Runnable runnable, String extraInfo);
void run(Runnable runnable);

See #executeRunnable

ParameterTypeAnnotationsDescription
runnableRunnable@NotNullThe Runnable to run
extraInfoString@Nullable(optional) Extra infos (for logging)

copy

implemented from Copyable.java

T: Runner



Back to top

Copyright © 2026 Mr_Tesz. All rights reserved

This site uses Just the Docs, a documentation theme for Jekyll.