Class ASTFactory.MethodCallBuilder

  • Enclosing class:
    ASTFactory

    public static class ASTFactory.MethodCallBuilder
    extends Object
    Builder for method call expressions.
    • Method Detail

      • on

        public ASTFactory.MethodCallBuilder on​(Expression target)
        Makes the call an instance call on the given receiver, inferring the owner from a field access or defaulting it to java/lang/Object for a variable.
        Parameters:
        target - the receiver expression
        Returns:
        this builder
      • on

        public ASTFactory.MethodCallBuilder on​(String staticOwner)
        Makes the call a static call on the given class, dropping any receiver.
        Parameters:
        staticOwner - the declaring class, in dotted or internal form
        Returns:
        this builder
      • owner

        public ASTFactory.MethodCallBuilder owner​(String ownerClass)
        Overrides the declaring class without changing the receiver.
        Parameters:
        ownerClass - the declaring class, in dotted or internal form
        Returns:
        this builder
      • build

        public MethodCallExpr build()
        Builds the call, falling back to java/lang/Object when no owner was set.
        Returns:
        the call expression
      • asStatement

        public ExprStmt asStatement()
        Builds the call and wraps it as a statement.
        Returns:
        the statement