Examples of JSObjectLiteral


Examples of com.google.gwt.dev.js.ast.JsObjectLiteral

      push(jsArrayLiteral);
    }

    @Override
    public void endVisit(JsonObject x, Context ctx) {
      JsObjectLiteral jsObjectLiteral = new JsObjectLiteral(x.getSourceInfo());
      popList(jsObjectLiteral.getPropertyInitializers(), x.propInits.size());
      push(jsObjectLiteral);
    }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsObjectLiteral

          JsNameRef superPrototypeRef = names.get(x.getSuperClass()).makeRef(
              sourceInfo);
          JsNew newExpr = new JsNew(sourceInfo, superPrototypeRef);
          protoObj = newExpr;
        } else {
          protoObj = new JsObjectLiteral(sourceInfo);
        }
        JsExpression protoAsg = createAssignment(seedProtoRef, protoObj);

        // Chain assign the same prototype to every live constructor.
        for (JMethod method : x.getMethods()) {
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsObjectLiteral

      push(jsArrayLiteral);
    }

    @Override
    public void endVisit(JsonObject x, Context ctx) {
      JsObjectLiteral jsObjectLiteral = new JsObjectLiteral(x.getSourceInfo());
      popList(jsObjectLiteral.getPropertyInitializers(), x.propInits.size());
      push(jsObjectLiteral);
    }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsObjectLiteral

      return false;
    }

    private JsObjectLiteral buildJsCastMapLiteral(List<JsExpression> runtimeTypeIdLiterals,
        SourceInfo sourceInfo) {
      JsObjectLiteral objLit = new JsObjectLiteral(sourceInfo);
      objLit.setInternable();
      List<JsPropertyInitializer> props = objLit.getPropertyInitializers();
      JsNumberLiteral one = new JsNumberLiteral(sourceInfo, 1);
      for (JsExpression runtimeTypeIdLiteral : runtimeTypeIdLiterals) {
        JsPropertyInitializer prop = new JsPropertyInitializer(sourceInfo,
            runtimeTypeIdLiteral, one);
        props.add(prop);
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsObjectLiteral

      if (castMap != null) {
        JField castableTypeMapField = program.getIndexedField("Object.castableTypeMap");
        JsName castableTypeMapName = names.get(castableTypeMapField);
        if (castableTypeMapName == null) {
          // Was pruned; this compilation must have no dynamic casts.
          return new JsObjectLiteral(SourceOrigin.UNKNOWN);
        }

        accept(castMap);
        return pop();
      }
      return new JsObjectLiteral(SourceOrigin.UNKNOWN);
    }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsObjectLiteral

            if (init.getType() == program.getJavaScriptObject()) {
              assert init instanceof JMethodCall;
              JMethod meth = ((JMethodCall) init).getTarget();
              // immortal types can only have non-primitive literal initializers of createArray,createObject
              if (meth == createObjMethod) {
                fieldVar.setInitExpr(new JsObjectLiteral(init.getSourceInfo()));
              } else if (meth == createArrMethod) {
                fieldVar.setInitExpr(new JsArrayLiteral(init.getSourceInfo()));
              } else {
                assert false : "Illegal initializer expression for immortal field " + field;
              }
View Full Code Here

Examples of org.hisrc.jscm.codemodel.expression.JSObjectLiteral

    }
  }

  public JSObjectLiteral visitElementPropertyInfo(
      MElementPropertyInfo<T, C> info) {
    JSObjectLiteral options = this.codeModel.object();
    options.append("type", this.codeModel.string("element"));
    createPropertyInfoOptions(info, options);
    createWrappableOptions(info, options);
    createElementTypeInfoOptions(info, options);
    return options;
  }
View Full Code Here

Examples of org.hisrc.jscm.codemodel.expression.JSObjectLiteral

    return options;
  }

  public JSObjectLiteral visitElementsPropertyInfo(
      MElementsPropertyInfo<T, C> info) {
    JSObjectLiteral options = this.codeModel.object();
    createPropertyInfoOptions(info, options);
    createWrappableOptions(info, options);
    createElementTypeInfosOptions(info, options);
    options.append("type", this.codeModel.string("elements"));
    return options;
  }
View Full Code Here

Examples of org.hisrc.jscm.codemodel.expression.JSObjectLiteral

      JSObjectLiteral options) {
    final JSArrayLiteral elementTypeInfos = this.codeModel.array();
    options.append("elementTypeInfos", elementTypeInfos);
    for (MElementTypeInfo<T, C> elementTypeInfo : info
        .getElementTypeInfos()) {
      final JSObjectLiteral elementTypeInfoOptions = this.codeModel
          .object();
      createElementTypeInfoOptions(elementTypeInfo,
          elementTypeInfoOptions);
      elementTypeInfos.append(elementTypeInfoOptions);
    }
View Full Code Here

Examples of org.hisrc.jscm.codemodel.expression.JSObjectLiteral

    }
  }

  public JSObjectLiteral visitAnyElementPropertyInfo(
      MAnyElementPropertyInfo<T, C> info) {
    JSObjectLiteral options = this.codeModel.object();
    createPropertyInfoOptions(info, options);
    createWildcardOptions(info, options);
    createMixableOptions(info, options);
    options.append("type", this.codeModel.string("anyElement"));
    return options;
  }
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.