Class MethodInvokerGenerator
java.lang.Object
eu.cloudnetservice.driver.network.rpc.defaults.handler.invoker.MethodInvokerGenerator
A utility class to generate and define an invoker for a method in the runtime.
- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmakeMethodInvoker(@NonNull MethodInformation methodInfo) Generates a method invoker based on the information supplied from the method information.makeNoArgsConstructorInvoker(@NonNull Class<?> clazz) Makes an invoker for a no-args<init>method (better known as a constructor) for the given class.
-
Field Details
-
SUPER
- See Also:
-
OBJ_DESCRIPTOR
-
METHOD_INVOKER
-
CALL_METHOD_DESCRIPTOR
-
CONSTRUCTOR_DESCRIPTOR
-
CLASS_NAME_FORMAT
- See Also:
-
NO_ARGS_CONSTRUCTOR_CLASS_NAME_FORMAT
- See Also:
-
-
Constructor Details
-
MethodInvokerGenerator
public MethodInvokerGenerator()
-
-
Method Details
-
makeMethodInvoker
@NonNull public @NonNull MethodInvoker makeMethodInvoker(@NonNull @NonNull MethodInformation methodInfo) Generates a method invoker based on the information supplied from the method information.- Parameters:
methodInfo- the information about the method the invoker is generated for.- Returns:
- the generated method invoker.
- Throws:
ClassCreationException- if something goes wrong during the class generation.
-
makeNoArgsConstructorInvoker
@NonNull public @NonNull MethodInvoker makeNoArgsConstructorInvoker(@NonNull @NonNull Class<?> clazz) Makes an invoker for a no-args<init>method (better known as a constructor) for the given class.- Parameters:
clazz- the class in which the no args constructor is located.- Returns:
- a generated invoker for the given class no-args constructor.
- Throws:
ClassCreationException- if something goes wrong during the class generation.
-