Class JLambdaImpl

java.lang.Object
org.jboss.jdeparser.AbstractJExpr
org.jboss.jdeparser.JLambdaImpl
All Implemented Interfaces:
JExpr, JLambda, Writable

class JLambdaImpl extends AbstractJExpr implements JLambda
  • Field Details

  • Constructor Details

    • JLambdaImpl

      JLambdaImpl()
  • Method Details

    • param

      public JLambda param(JType type, 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(String typeName, 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(Class<?> type, 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(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 IOException
      Specified by:
      write in interface Writable
      Throws:
      IOException