Interface MethodCreator

    • Method Detail

      • addException

        MethodCreator addException​(java.lang.String exception)
        Adds an exception to the method signature
        Parameters:
        exception - The exception
        Returns:
        This creator
      • addException

        default MethodCreator addException​(java.lang.Class<?> exception)
        Adds an exception to the method signature
        Parameters:
        exception - The exception
        Returns:
        This creator
      • getExceptions

        java.util.List<java.lang.String> getExceptions()
        Returns:
        The exceptions thrown by this method
      • getMethodDescriptor

        MethodDescriptor getMethodDescriptor()
        Returns:
        The method descriptor
      • getParameterAnnotations

        AnnotatedElement getParameterAnnotations​(int param)
      • setParameterNames

        void setParameterNames​(java.lang.String[] parameterNames)
        Sets names of all this method's parameters. The length of parameterNames must be equal to the number of this method's parameters. Removes previously set parameter names if parameterNames is null.

        It is required to set all parameter names in one go, because parameter names are stored in bytecode as a simple sequence, without positions.

        When generating a method with mandated or synthetic parameters (such as an inner class constructor), remember that these parameters must have names too.

        Parameters:
        parameterNames - names of all parameters of this method