private void setCall() {
    if (wildcardCall) {
      if (implicitTarget) {
        call(resources.getAstNodeCache().InteractionBuilder_AddEqualTarget, AstUtil.getImplicitParameterRef(activeWithOrMockClosure));
      } else {
        // turn _ into _._
        // gives better better behavior for stub with required interaction
        call(resources.getAstNodeCache().InteractionBuilder_AddWildcardTarget);
      }
      // not same as leaving it out - doesn't match Object.toString() etc.
      call(resources.getAstNodeCache().InteractionBuilder_AddEqualMethodName, new ConstantExpression(Wildcard.INSTANCE.toString()));
    } else if (call instanceof PropertyExpression) {
      setPropertyCall();
    } else if (call instanceof MethodCallExpression) {
      setMethodCall();
    } else if (call instanceof ConstructorCallExpression) {
      setConstructorCall();
    } else {
      throw new UnreachableCodeError();
    }
  }
If the given statement is a valid interaction definition, returns the rewritten statement.
If the given statement is not an interaction definition, returns null.
If the given statement is an invalid interaction definition, records a compile error
and returns null.
spock-core/src/main/java/org/spockframework/compiler/InteractionRewriter.java