Skip to content

Commit

Permalink
jector: fixed javadoc
Browse files Browse the repository at this point in the history
*	modified:   jector-monkey/src/main/java/com/avrsandbox/jector/monkey/core/work/MonkeyWorkerTask.java
*	modified:   jector/src/main/java/com/avrsandbox/jector/core/work/TaskExecutorsManager.java
*	modified:   jector/src/main/java/com/avrsandbox/jector/core/work/WorkerTask.java
*	modified:   jector/src/main/java/com/avrsandbox/jector/util/Tasks.java
  • Loading branch information
Scrappers-glitch committed Jul 29, 2023
1 parent ffad537 commit a80bd71
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ public abstract class MonkeyWorkerTask extends WorkerTask {
*/
protected float timePerFrame;

/**
* Instantiates a JME worker task mapping a method to be executed
* on the JME-3 Main thread.
*/
public MonkeyWorkerTask() {
super();
}

/**
* Updates the time-per-frame value (in seconds).
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ protected void bind(Class<? extends TaskExecutor>[] clazzes, Worker worker, Meth
* Binds a method to a task executor instance by wrapping it into a {@link WorkerTask}.
*
* @param taskExecutor the executor instance
* @param worker the worker class containing the runnable annotated methods
* @param method the method to wrap as a task
* @param args the method arguments, or null for nullary methods
*/
Expand All @@ -230,7 +231,8 @@ public Object call() {
/**
* Executes a method passing in its arguments object and the binder object,
* the signature of the parameterized methods must be [Object method(MethodArguments, TaskBinder)].
*
*
* @param worker the worker class containing the runnable annotated methods
* @param method the method to execute, should be of the signature
* [Object method(MethodArguments, TaskBinder)]
* @param args the method arguments data structure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

/**
* Defines a task for a worker object, a task maps a method to be
* executed in the annotated {@link TaskExecutor}.
* executed with the annotated {@link TaskExecutor}.
*
* @author pavl_g
*/
Expand All @@ -52,6 +52,12 @@ public abstract class WorkerTask implements Callable<Object> {
*/
protected volatile Object result;

/**
* Instantiates a worker task mapping a method to be executed.
*/
public WorkerTask() {
}

/**
* Sets the return result of this task, "null" if a task to a void
* method is specified.
Expand Down
1 change: 1 addition & 0 deletions jector/src/main/java/com/avrsandbox/jector/util/Tasks.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public static WorkerTask getWorkerTask(TaskExecutorsManager taskExecutorsManager
* Retrieves a worker task return value from its task executor object (which is registered to
* a task binder).
*
* @param <T> a method generic to avoid further dynamic casting
* @param taskExecutorsManager the manager instance holding the TaskExecutors
* @param clazz the represented executor holding the task to retrieve
* @param name the name of the task to retrieve (usually the name of the worker method)
Expand Down

0 comments on commit a80bd71

Please sign in to comment.