Class JLambdaImpl

    • Constructor Detail

      • JLambdaImpl

        JLambdaImpl()
    • Method Detail

      • param

        public JLambda param​(JType type,
                             java.lang.String name)
        Description copied from interface: JLambda
        Add a declared-type parameter to this lambda.
        Specified by:
        param in interface JLambda
        Parameters:
        type - the parameter type
        name - the parameter name
        Returns:
        this lambda
      • param

        public JLambda param​(java.lang.String typeName,
                             java.lang.String name)
        Description copied from interface: JLambda
        Add a declared-type parameter to this lambda.
        Specified by:
        param in interface JLambda
        Parameters:
        typeName - the parameter type name
        name - the parameter name
        Returns:
        this lambda
      • param

        public JLambda param​(java.lang.Class<?> type,
                             java.lang.String name)
        Description copied from interface: JLambda
        Add a declared-type parameter to this lambda.
        Specified by:
        param in interface JLambda
        Parameters:
        type - the parameter type
        name - the parameter name
        Returns:
        this lambda
      • param

        public JLambda param​(java.lang.String name)
        Description copied from interface: JLambda
        Add an inferred-type parameter to this lambda. If one parameter is inferred, all will be, despite any declared parameter type.
        Specified by:
        param in interface JLambda
        Parameters:
        name - the parameter name
        Returns:
        this lambda
      • body

        public JBlock body()
        Description copied from interface: JLambda
        Get the lambda body as a block. Clears any expression body.
        Specified by:
        body in interface JLambda
        Returns:
        the lambda body
      • body

        public JLambda body​(JExpr expression)
        Description copied from interface: JLambda
        Set the lambda body as an expression. Clears any block body or previously set expression body.
        Specified by:
        body in interface JLambda
        Parameters:
        expression - the expression body of this lambda
        Returns:
        this lambda
      • write

        public void write​(SourceFileWriter writer)
                   throws java.io.IOException
        Specified by:
        write in interface Writable
        Throws:
        java.io.IOException