Class JInvocation

All Implemented Interfaces:
JExpression, JGenerable, JStatement

public final class JInvocation extends JExpressionImpl implements JStatement
JMethod invocation
  • Method Details

    • arg

      public JInvocation arg(JExpression arg)
      Add an expression to this invocation's argument list
      Parameters:
      arg - Argument to add to argument list
    • arg

      public JInvocation arg(String v)
      Adds a literal argument. Short for arg(JExpr.lit(v))
    • listArgs

      public JExpression[] listArgs()
      Returns all arguments of the invocation.
      Returns:
      If there's no arguments, an empty array will be returned.
    • generate

      public void generate(JFormatter f)
      Specified by:
      generate in interface JGenerable
    • state

      public void state(JFormatter f)
      Specified by:
      state in interface JStatement