java.lang.Object
eu.cloudnetservice.driver.network.rpc.defaults.handler.invoker.MethodInvokerGenerator

public class MethodInvokerGenerator extends Object
A utility class to generate and define an invoker for a method in the runtime.
Since:
4.0
  • Field Details

    • SUPER

      private static final String SUPER
      See Also:
    • OBJ_DESCRIPTOR

      private static final String OBJ_DESCRIPTOR
    • METHOD_INVOKER

      private static final String[] METHOD_INVOKER
    • CALL_METHOD_DESCRIPTOR

      private static final String CALL_METHOD_DESCRIPTOR
    • CONSTRUCTOR_DESCRIPTOR

      private static final String CONSTRUCTOR_DESCRIPTOR
    • CLASS_NAME_FORMAT

      private static final String CLASS_NAME_FORMAT
      See Also:
    • NO_ARGS_CONSTRUCTOR_CLASS_NAME_FORMAT

      private static final String 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 &lt;init&gt; 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.