Class DefaultModuleTaskEntry
java.lang.Object
eu.cloudnetservice.driver.module.DefaultModuleTaskEntry
- All Implemented Interfaces:
ModuleTaskEntry
Represents the default implementation of the module task entry.
- Since:
- 4.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final InjectionLayer<?> protected static final StringA simple format which allows unique method identifiers.protected final dev.derklaro.reflexion.MethodAccessor<?> protected final ModuleTaskprotected final ModuleWrapperprotected final dev.derklaro.aerogel.Element[] -
Constructor Summary
ConstructorsConstructorDescriptionDefaultModuleTaskEntry(@NonNull ModuleWrapper wrapper, @NonNull ModuleTask task, @NonNull Method method) Constructs a new instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionvoidfire()Fires this module task.Get the full method signature of the detected method.module()The module (or module main class) this task was detected in.The associated module wrapper this task was detected by.taskInfo()The annotation holding the information about this task.
-
Field Details
-
METHOD_SIGNATURE_FORMAT
A simple format which allows unique method identifiers. Format: declaring class@method name()- See Also:
-
methodAccessor
protected final dev.derklaro.reflexion.MethodAccessor<?> methodAccessor -
paramTypes
protected final dev.derklaro.aerogel.Element[] paramTypes -
injectionLayer
-
moduleTask
-
moduleWrapper
-
fullMethodSignatureCached
-
-
Constructor Details
-
DefaultModuleTaskEntry
public DefaultModuleTaskEntry(@NonNull @NonNull ModuleWrapper wrapper, @NonNull @NonNull ModuleTask task, @NonNull @NonNull Method method) throws IllegalAccessException Constructs a new instance of this class.- Parameters:
wrapper- the module wrapper associated with this task entry.task- the module task annotation based on which this entry was created.method- the method which was annotated withModuleTask.- Throws:
IllegalAccessException- if access checking for the provided method fails.NullPointerException- if wrapper, task or method is null.
-
-
Method Details
-
module
The module (or module main class) this task was detected in.- Specified by:
modulein interfaceModuleTaskEntry- Returns:
- the associated module to this task.
-
moduleWrapper
The associated module wrapper this task was detected by.- Specified by:
moduleWrapperin interfaceModuleTaskEntry- Returns:
- the associated module wrapper to this task.
- See Also:
-
taskInfo
The annotation holding the information about this task.- Specified by:
taskInfoin interfaceModuleTaskEntry- Returns:
- the task information.
-
fullMethodSignature
Get the full method signature of the detected method. This must not be in the standard java signature declaration format. However, this descriptor must be unique for debug reasons.- Specified by:
fullMethodSignaturein interfaceModuleTaskEntry- Returns:
- a unique descriptor of the method in the main module class.
-
fire
Fires this module task.- Specified by:
firein interfaceModuleTaskEntry- Throws:
Throwable- anything thrown by the underlying method.
-