Examples of JNewInstance


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

          throw new InternalCompilerException(
              "String constructor error; no matching implementation.");
        }
        call = new JMethodCall(program, makeSourceInfo(x), null, targetMethod);
      } else {
        JNewInstance newInstance = new JNewInstance(program, info, newType);
        call = new JMethodCall(program, info, newInstance, ctor);
      }

      // Plain old regular user arguments
      if (x.arguments != null) {
View Full Code Here

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

      SourceInfo info = makeSourceInfo(x);
      MethodBinding b = x.binding;
      JMethod ctor = (JMethod) typeMap.get(b);
      JClassType enclosingType = (JClassType) ctor.getEnclosingType();
      JNewInstance newInstance = new JNewInstance(program, info, enclosingType);
      JMethodCall call = new JMethodCall(program, info, newInstance, ctor);
      JExpression qualifier = dispProcessExpression(x.enclosingInstance);
      List qualList = new ArrayList();
      qualList.add(qualifier);
View Full Code Here

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

            }
          }
        }
        assert (noArgCtor != null);
        // Call it, using a new expression as a qualifier
        JNewInstance newInstance = new JNewInstance(program, x.getSourceInfo(),
            classType);
        JMethodCall call = new JMethodCall(program, x.getSourceInfo(),
            newInstance, noArgCtor);
        ctx.replaceMe(call);
      }
View Full Code Here

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

            throw new UnableToCompleteException();
          }

          // Construct a new instance of the class to qualify the non-static
          // call
          JNewInstance newInstance = new JNewInstance(program, null, mainClass);
          qualifier = new JMethodCall(program, null, newInstance, noArgCtor);
        }
      }

      // qualifier will be null if onModuleLoad is static
View Full Code Here

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

    final JMethod loggerConstructor = this.findLevelLoggerConstructorMethod(logger);
    log("loggerConstructor -> " + loggerConstructor);

    // inserts a new xxxLevelLogger( Logger )
    final JProgram program = this.getProgram();
    final JNewInstance noneLevelLogger = new JNewInstance(program, methodCall.getSourceInfo(), logger);
    JMethodCall call = new JMethodCall(program, methodCall.getSourceInfo(), noneLevelLogger, loggerConstructor);

    context.replaceMe(call);
  }
View Full Code Here

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

    }

    // havent built new wrapped expression!
    final JProgram program = this.getProgram();

    final JNewInstance newTargetInstance = new JNewInstance(program, methodCall.getSourceInfo(), targetLogger);
    final JMethodCall callNewTargetInstance = new JMethodCall(program, methodCall.getSourceInfo(), newTargetInstance,
        targetLoggerConstructor);
    callNewTargetInstance.getArgs().add(program.getLiteralString(name));

    // inserts a new xxxLevelLogger( Logger )
    final JNewInstance newLevelLoggerInstance = new JNewInstance(program, methodCall.getSourceInfo(), logger);
    JMethodCall call = new JMethodCall(program, methodCall.getSourceInfo(), newLevelLoggerInstance, loggerConstructor);
    call.getArgs().add(callNewTargetInstance);

    context.replaceMe(call);
  }
View Full Code Here

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

          throw new InternalCompilerException(
              "String constructor error; no matching implementation.");
        }
        call = new JMethodCall(makeSourceInfo(x), null, targetMethod);
      } else {
        JNewInstance newInstance = new JNewInstance(info, newType);
        call = new JMethodCall(info, newInstance, ctor);
      }

      // Enums: hidden arguments for the name and id.
      if (x.enumConstant != null) {
View Full Code Here

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

      SourceInfo info = makeSourceInfo(x);
      MethodBinding b = x.binding;
      JMethod ctor = (JMethod) typeMap.get(b);
      JClassType enclosingType = (JClassType) ctor.getEnclosingType();
      JNewInstance newInstance = new JNewInstance(info, enclosingType);
      JMethodCall call = new JMethodCall(info, newInstance, ctor);
      JExpression qualifier = dispProcessExpression(x.enclosingInstance);
      List<JExpression> qualList = new ArrayList<JExpression>();
      qualList.add(qualifier);
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.