Package org.apache.derby.iapi.services.compiler

Examples of org.apache.derby.iapi.services.compiler.MethodBuilder.callMethod()


            // Set the correct parameter nodes in the ParameterValueSet at constructor time.
            constructor.dup();
            constructor.push(applicationParameterNumber);
            constructor.push(parameterMode);
            constructor.callMethod(VMOpcode.INVOKEINTERFACE, null,
                    "setParameterMode", "void", 2);

            // Pass the value of the outparameters back to the calling code
            LocalField lf = outParamArrays[i];
View Full Code Here


    // declare field
    LocalField field = acb.newFieldDeclaration(Modifier.PRIVATE, type);

    /* Generate the call to the new method */
    mb.pushThis();
    mb.callMethod(VMOpcode.INVOKEVIRTUAL, (String) null, mbsq.getName(), type, 0);

    // generate: field = value (value is on stack)
    mb.setField(field);

    return field;
View Full Code Here

//    }
//

        // generate code to reinitializeQualifiers(Qualifier[][] qualifiers)
    executeMB.getField(qualField); // first arg to reinitializeQualifiers()
    executeMB.callMethod(
            VMOpcode.INVOKESTATIC,
            acb.getBaseClassName(), "reinitializeQualifiers", "void", 1);

    /*
    ** Initialize the Qualifier array to a new Qualifier[][] if
View Full Code Here

    ** Generate a call to get an indexable row
    ** with the given number of columns
    */
    acb.pushGetExecutionFactoryExpression(mb); // instance
    mb.push(numberOfColumns);
    mb.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.ExecutionFactory, "getIndexableRow", ClassName.ExecIndexRow, 1);

    /*
    ** Assign the indexable row to a field, and put this assignment into
    ** the constructor for the activation class.  This way, we only have
    ** to get the row once.
View Full Code Here

    else
      pred.generateExpressionOperand(optTable, baseColumns[columnNumber], acb, mb);

    mb.upCast(ClassName.DataValueDescriptor);

    mb.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Row, "setColumn", "void", 2);

    /* Also tell the row if this column uses ordered null semantics */
    if (!isIn)
    {
      RelationalOperator relop = pred.getRelop();
View Full Code Here

      }
      if (setOrderedNulls)
      {
        mb.getField(rowField);
        mb.push(columnNumber);
        mb.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.ExecIndexRow, "orderedNulls", "void", 1);
      }
    }
  }

  /**
 
View Full Code Here

    MethodBuilder rmb = acb.startResetMethod();

    rmb.pushThis();
    rmb.push(cursorName);
    rmb.push(preStmt.getObjectName());
    rmb.callMethod(VMOpcode.INVOKEVIRTUAL, ClassName.BaseActivation, "checkPositionedStatement",
            "void", 2);

    rmb.methodReturn();
    rmb.complete();
  }
View Full Code Here

      closeActivationMethod.conditionalIfNull();
        // do nothing
        closeActivationMethod.push(0); // work around for no support for real if statements
      closeActivationMethod.startElseCode();
        closeActivationMethod.getField(psHolder);
        closeActivationMethod.callMethod(VMOpcode.INVOKEINTERFACE, "java.sql.Statement",
          "close", "void", 0);
        closeActivationMethod.push(0);

      closeActivationMethod.completeConditional();
      closeActivationMethod.endStatement();
View Full Code Here

          if (parameterType.endsWith("[]")) {

            // constructor  - setting up correct paramter type info
            MethodBuilder constructor = acb.getConstructor();
            acb.pushThisAsActivation(constructor);
            constructor.callMethod(VMOpcode.INVOKEINTERFACE, null,
                      "getParameterValueSet", ClassName.ParameterValueSet, 0);

            constructor.push(applicationParameterNumber);
            constructor.push(JDBC30Translation.PARAMETER_MODE_UNKNOWN);
            constructor.callMethod(VMOpcode.INVOKEINTERFACE, null,
View Full Code Here

            constructor.callMethod(VMOpcode.INVOKEINTERFACE, null,
                      "getParameterValueSet", ClassName.ParameterValueSet, 0);

            constructor.push(applicationParameterNumber);
            constructor.push(JDBC30Translation.PARAMETER_MODE_UNKNOWN);
            constructor.callMethod(VMOpcode.INVOKEINTERFACE, null,
                      "setParameterMode", "void", 2);
            constructor.endStatement();
          }
        }
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.