Package com.google.gwt.dev.jjs.ast

Examples of com.google.gwt.dev.jjs.ast.JReturnStatement


      // wrap it in a return if necessary
      JStatement callOrReturn;
      if (bridgeMethod.getType() == program.getTypeVoid()) {
        callOrReturn = call.makeStatement();
      } else {
        callOrReturn = new JReturnStatement(program.createSourceInfoSynthetic(
            GenerateJavaAST.class, "part of a bridge method"), call);
      }

      // create a body that is just that call
      JMethodBody body = (JMethodBody) bridgeMethod.getBody();
View Full Code Here


      } else {
        info = method.getSourceInfo();
      }

      block.clear();
      block.addStmt(new JReturnStatement(info, returnValue));
    }
View Full Code Here

          currentMethod.getParams().get(0));
      JMethod delegateTo = program.getIndexedMethod("Enum.valueOf");
      JMethodCall call = new JMethodCall(sourceInfo, null, delegateTo);
      call.addArgs(mapRef, nameRef);
      currentMethodBody.getBlock().addStmt(
          new JReturnStatement(sourceInfo, call));
    }
View Full Code Here

        initializers.add(fieldRef);
      }
      JNewArray newExpr = JNewArray.createInitializers(program, sourceInfo,
          program.getTypeArray(type, 1), initializers);
      currentMethodBody.getBlock().addStmt(
          new JReturnStatement(sourceInfo, newExpr));
    }
View Full Code Here

      }
      JStatement statement;
      if (returnType == program.getTypeVoid()) {
        statement = newCall.makeStatement();
      } else {
        statement = new JReturnStatement(delegateCallSourceInfo, newCall);
      }
      newBody.getBlock().addStmt(statement);

      /*
       * Rewrite the method body. Update all thisRefs to paramRefs. Update
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.ast.JReturnStatement

Copyright © 2018 www.massapicom. 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.