Interface JMethodDef

    • Method Detail

      • _default

        JBlock _default()
        A default method body for a JDK 8+ interface method.
        Returns:
        the method body
      • _default

        JMethodDef _default​(JExpr expr)
        A default value for an annotation method.
        Parameters:
        expr - the value
        Returns:
        this method definition
      • body

        JBlock body()
        Get the method body.
        Returns:
        the method body
      • returnsDoc

        JComment returnsDoc()
        Get the @return doc comment block.
        Returns:
        the comment block
      • param

        JParamDeclaration param​(int mods,
                                JType type,
                                java.lang.String name)
        Add a parameter to this method.
        Parameters:
        mods - the parameter modifiers
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • param

        JParamDeclaration param​(JType type,
                                java.lang.String name)
        Add a parameter to this method.
        Parameters:
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • param

        JParamDeclaration param​(int mods,
                                java.lang.String type,
                                java.lang.String name)
        Add a parameter to this method.
        Parameters:
        mods - the parameter modifiers
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • param

        JParamDeclaration param​(java.lang.String type,
                                java.lang.String name)
        Add a parameter to this method.
        Parameters:
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • param

        JParamDeclaration param​(int mods,
                                java.lang.Class<?> type,
                                java.lang.String name)
        Add a parameter to this method.
        Parameters:
        mods - the parameter modifiers
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • param

        JParamDeclaration param​(java.lang.Class<?> type,
                                java.lang.String name)
        Add a parameter to this method.
        Parameters:
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • varargParam

        JParamDeclaration varargParam​(int mods,
                                      JType type,
                                      java.lang.String name)
        Add a vararg parameter to this method.
        Parameters:
        mods - the parameter modifiers
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • varargParam

        JParamDeclaration varargParam​(JType type,
                                      java.lang.String name)
        Add a vararg parameter to this method.
        Parameters:
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • varargParam

        JParamDeclaration varargParam​(int mods,
                                      java.lang.String type,
                                      java.lang.String name)
        Add a vararg parameter to this method.
        Parameters:
        mods - the parameter modifiers
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • varargParam

        JParamDeclaration varargParam​(java.lang.String type,
                                      java.lang.String name)
        Add a vararg parameter to this method.
        Parameters:
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • varargParam

        JParamDeclaration varargParam​(int mods,
                                      java.lang.Class<?> type,
                                      java.lang.String name)
        Add a vararg parameter to this method.
        Parameters:
        mods - the parameter modifiers
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • varargParam

        JParamDeclaration varargParam​(java.lang.Class<?> type,
                                      java.lang.String name)
        Add a vararg parameter to this method.
        Parameters:
        type - the parameter type
        name - the parameter name
        Returns:
        the parameter declaration
      • params

        JParamDeclaration[] params()
        Get the list of parameters defined thus far.
        Returns:
        the parameter list
      • _throws

        JComment _throws​(java.lang.String type)
        Get a @throws doc comment block.
        Parameters:
        type - the exception type
        Returns:
        the doc comment block
      • _throws

        JComment _throws​(JType type)
        Get a @throws doc comment block.
        Parameters:
        type - the exception type
        Returns:
        the doc comment block
      • _throws

        JComment _throws​(java.lang.Class<? extends java.lang.Throwable> type)
        Get a @throws doc comment block.
        Parameters:
        type - the exception type
        Returns:
        the doc comment block