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

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


    else
    {
      leftOperand.generateExpression(acb, qualMethod);
    }

    qualMethod.methodReturn();
    qualMethod.complete();

    /* push an expression that evaluates to the GeneratedMethod */
    acb.pushMethodReference(mb, qualMethod);
  }
View Full Code Here


       
        // Generate the complete ResultSet tree for this statement.
        // This step may add statements into the execute method
        // for per-execution actions.
        generate(generatingClass, mbWorker);
        mbWorker.methodReturn();
        mbWorker.complete();

       // wrap up the activation class definition
    // generate on the tree gave us back the newExpr
    // for getting a result set on the tree.
View Full Code Here

      /* Generate the code to get the primitive value */
      mb.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.DataValueDescriptor,
                value.getTypeCompiler().getPrimitiveMethodName(), primitiveTN, 0);

      mb.methodReturn();
      mb.complete();

      /* Generate the call to the new method, with the parameter */

      mbex.pushThis();
 
View Full Code Here

        // Add a method that indicates the maxium number of dynamic result sets.
        int maxDynamicResults = routineInfo.getMaxDynamicResultSets();
        if (maxDynamicResults > 0) {
          MethodBuilder gdr = acb.getClassBuilder().newMethodBuilder(Modifier.PUBLIC, "int", "getMaxDynamicResults");
          gdr.push(maxDynamicResults);
          gdr.methodReturn();
          gdr.complete();
        }

        // add a method to return all the dynamic result sets (unordered)
        MethodBuilder gdr = acb.getClassBuilder().newMethodBuilder(Modifier.PUBLIC, "java.sql.ResultSet[][]", "getDynamicResults");
View Full Code Here

    mb.putField(field);

    /* Stuff the full expression into a return statement and add that to the
     * body of the new method.
     */
    mb.methodReturn();

    // complete the method
    mb.complete();

    /* Generate the call to the new method */
 
View Full Code Here

  {
    // create a constructor that just calls super. 
    MethodBuilder realConstructor =
      cb.newConstructorBuilder(Modifier.PUBLIC);
    realConstructor.callSuper();
    realConstructor.methodReturn();
    realConstructor.complete();

    constructor = cb.newMethodBuilder(Modifier.PUBLIC, "void", "postConstructor");
    constructor.addThrownException(ClassName.StandardException);
  }
View Full Code Here

        */
        if(mb.statementNumHitLimit(10))
        {
          MethodBuilder dmb = acb.newGeneratedFun(ClassName.ResultSet, Modifier.PRIVATE);
          dependentNodes[index].generate(acb,dmb); //generates the resultset expression
          dmb.methodReturn();
          dmb.complete();
          /* Generate the call to the new method */
          mb.pushThis();
          //second arg will be generated by this call
          mb.callMethod(VMOpcode.INVOKEVIRTUAL, (String) null, dmb.getName(), ClassName.ResultSet, 0);
View Full Code Here

    // be executed directly as e0.
    MethodBuilder userExprFun = acb.newGeneratedFun("void", Modifier.PUBLIC);
    userExprFun.addThrownException("java.lang.Exception");
    methodCallBody.generate(acb, userExprFun);
    userExprFun.endStatement();
    userExprFun.methodReturn();
    userExprFun.complete();

    acb.pushGetResultSetFactoryExpression(mb);
    acb.pushMethodReference(mb, userExprFun); // first arg
    acb.pushThisAsActivation(mb); // arg 2
View Full Code Here

     *    return <checkExpress.generate(ecb)>;
     * and adds it to userExprFun
     */

    checkConstraints.generateExpression(ecb, userExprFun);
    userExprFun.methodReturn();
   
    // we are done modifying userExprFun, complete it.
    userExprFun.complete();

    return userExprFun;
View Full Code Here

    /* generates:
     *    return;
     * And adds it to userExprFun
     */
    userExprFun.methodReturn();
   
    // we are done modifying userExprFun, complete it.
    userExprFun.complete();

    return userExprFun;
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.