Examples of freezeParamTypes()


Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

    SourceInfo sourceInfo = program.createSourceInfoSynthetic(
        JavaToJavaScriptCompiler.class, "Bootstrap method");
    JMethod bootStrapMethod = program.createMethod(sourceInfo,
        "init".toCharArray(), program.getIndexedType("EntryMethodHolder"),
        program.getTypeVoid(), false, true, true, false, false);
    bootStrapMethod.freezeParamTypes();

    JMethodBody body = (JMethodBody) bootStrapMethod.getBody();
    JBlock block = body.getBlock();

    // Also remember $entry, which we'll handle specially in GenerateJsAst
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

                  BuildDeclMapVisitor.class, "reference"), syntheticParam));
        }
      }

      // Lock the method.
      synthetic.freezeParamTypes();

      // return (new Foo()).Foo() : The only statement in the function
      JReturnStatement ret = new JReturnStatement(
          synthetic.getSourceInfo().makeChild(BuildDeclMapVisitor.class,
              "Return statement"), call);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

          JMethod getClassMethod = program.createMethod(
              type.getSourceInfo().makeChild(BuildDeclMapVisitor.class,
                  "Synthetic getClass()"), "getClass".toCharArray(), type,
              program.getTypeJavaLangClass(), false, false, false, false, false);
          assert (type.getMethods().get(2) == getClassMethod);
          getClassMethod.freezeParamTypes();
        }

        if (binding.isNestedType() && !binding.isStatic()) {
          // add synthetic fields for outer this and locals
          assert (type instanceof JClassType);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

                "name".toCharArray(), program.getTypeJavaLangString(), true,
                false, newMethod);
          } else {
            assert false;
          }
          newMethod.freezeParamTypes();
        }
      }
    }

    private JMethod processMethodBinding(MethodBinding b,
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

        true, newMethod);
    for (JParameter oldParam : objectMethod.getParams()) {
      program.createParameter(sourceInfo, oldParam.getName().toCharArray(),
          oldParam.getType(), true, false, newMethod);
    }
    newMethod.freezeParamTypes();

    // Build from bottom up.
    JMethodCall condition = new JMethodCall(sourceInfo, null,
        isJavaObjectMethod);
    condition.addArg(new JParameterRef(sourceInfo, thisParam));
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

        JType paramType = (JType) typeMap.get(jdtParamType.erasure());
        program.createParameter(program.createSourceInfoSynthetic(
            GenerateJavaAST.class, "part of a bridge method"),
            paramName.toCharArray(), paramType, true, false, bridgeMethod);
      }
      bridgeMethod.freezeParamTypes();

      // create a call
      JMethodCall call = new JMethodCall(program.createSourceInfoSynthetic(
          GenerateJavaAST.class, "call to inherited method"),
          program.getExprThisRef(program.createSourceInfoSynthetic(
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

                  BuildDeclMapVisitor.class, "reference"), syntheticParam));
        }
      }

      // Lock the method.
      synthetic.freezeParamTypes();

      // return (new Foo()).Foo() : The only statement in the function
      JReturnStatement ret = new JReturnStatement(
          synthetic.getSourceInfo().makeChild(BuildDeclMapVisitor.class,
              "Return statement"), call);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

          JMethod getClassMethod = program.createMethod(
              type.getSourceInfo().makeChild(BuildDeclMapVisitor.class,
                  "Synthetic getClass()"), "getClass".toCharArray(), type,
              program.getTypeJavaLangClass(), false, false, false, false, false);
          assert (type.getMethods().get(2) == getClassMethod);
          getClassMethod.freezeParamTypes();
        }

        if (binding.isNestedType() && !binding.isStatic()) {
          // add synthetic fields for outer this and locals
          assert (type instanceof JClassType);
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

                "name".toCharArray(), program.getTypeJavaLangString(), true,
                false, newMethod);
          } else {
            assert false;
          }
          newMethod.freezeParamTypes();
        }
      }
    }

    private JMethod processMethodBinding(MethodBinding b,
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JMethod.freezeParamTypes()

         */
        JMethod clinit = program.createMethod(info.makeChild(
            BuildTypeMapVisitor.class, "Class initializer"),
            "$clinit".toCharArray(), newType, program.getTypeVoid(), false,
            true, true, true, false);
        clinit.freezeParamTypes();

        if (newType instanceof JClassType) {
          JMethod init = program.createMethod(info.makeChild(
              BuildTypeMapVisitor.class, "Instance initializer"),
              "$init".toCharArray(), newType, program.getTypeVoid(), false,
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.