Examples of JClassLiteral


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

        JExpression arg0 = x.getArgs().get(0);
        if (!(arg0 instanceof JClassLiteral)) {
          error(arg0.getSourceInfo(), "Only a class literal may be passed to runAsyncCode");
          return;
        }
        JClassLiteral lit = (JClassLiteral) arg0;
        String name = nameFromClassLiteral(lit);
        List<JRunAsync> matches = replacementsByName.get(name);
        SourceInfo info = x.getSourceInfo();
        if (matches == null || matches.size() == 0) {
          error(info, "No runAsync call is named " + name);
View Full Code Here

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

      JExpression arg = gwtCreateCall.getArgs().get(0);
      if (!(arg instanceof JClassLiteral)) {
        error(gwtCreateCall, "Only class literals may be used as arguments to GWT.create()");
        return null;
      }
      JClassLiteral classLiteral = (JClassLiteral) arg;
      if (!(classLiteral.getRefType() instanceof JDeclaredType)) {
        error(gwtCreateCall,
          "Only classes and interfaces may be used as arguments to GWT.create()");
        return null;
      }
View Full Code Here

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

      JMethod method = x.getTarget();
      if (method == program.getRebindCreateMethod()) {
        assert (x.getArgs().size() == 1);
        JExpression arg = (JExpression) x.getArgs().get(0);
        assert (arg instanceof JClassLiteral);
        JClassLiteral classLiteral = (JClassLiteral) arg;
        JClassType classType = program.rebind(classLiteral.getRefType());

        /*
         * Find the appropriate (noArg) constructor. In our AST, constructors
         * are instance methods that should be qualified with a new expression.
         */
 
View Full Code Here

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

          JMethodCall staticOnModuleLoadCall =
              new JMethodCall(origin, null, specificOnModuleLoadMethod);
          initMethodBlock.addStmt(staticOnModuleLoadCall.makeStatement());
        } else {
          // Synthesize ((EntryPoint)GWT.create(FooEntryPoint.class)).onModuleLoad();
          JClassLiteral entryPointTypeClassLiteral =
              new JClassLiteral(origin, specificEntryPointType);
          JMethodCall createInstanceCall =
              new JMethodCall(origin, null, gwtCreateMethod, entryPointTypeClassLiteral);
          JCastOperation castToEntryPoint =
              new JCastOperation(origin, entryPointType, createInstanceCall);
          JMethodCall instanceOnModuleLoadCall =
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.