Package org.hisrc.jscm.codemodel.expression

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


    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

      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

    }
  }

  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

    return options;
  }

  public JSObjectLiteral visitAttributePropertyInfo(
      MAttributePropertyInfo<T, C> info) {
    JSObjectLiteral options = this.codeModel.object();
    createPropertyInfoOptions(info, options);
    createTypedOptions(info, options);
    options.append("attributeName",
        module.createAttributeNameExpression(info.getAttributeName()));
    options.append("type", this.codeModel.string("attribute"));
    return options;
  }
View Full Code Here

    return options;
  }

  public JSObjectLiteral visitAnyAttributePropertyInfo(
      MAnyAttributePropertyInfo<T, C> info) {
    JSObjectLiteral options = this.codeModel.object();
    createPropertyInfoOptions(info, options);
    options.append("type", this.codeModel.string("anyAttribute"));
    return options;
  }
View Full Code Here

    options.append("type", this.codeModel.string("anyAttribute"));
    return options;
  }

  public JSObjectLiteral visitValuePropertyInfo(MValuePropertyInfo<T, C> info) {
    JSObjectLiteral options = this.codeModel.object();
    createPropertyInfoOptions(info, options);
    createTypedOptions(info, options);
    options.append("type", this.codeModel.string("value"));
    return options;
  }
View Full Code Here

    return options;
  }

  public JSObjectLiteral visitElementRefPropertyInfo(
      MElementRefPropertyInfo<T, C> info) {
    JSObjectLiteral options = this.codeModel.object();
    createPropertyInfoOptions(info, options);
    createMixableOptions(info, options);
    createWrappableOptions(info, options);
    createWildcardOptions(info, options);
    createElementTypeInfoOptions(info, options);
    options.append("type", this.codeModel.string("elementRef"));
    return options;
  }
View Full Code Here

    return options;
  }

  public JSObjectLiteral visitElementRefsPropertyInfo(
      MElementRefsPropertyInfo<T, C> info) {
    JSObjectLiteral options = this.codeModel.object();
    createPropertyInfoOptions(info, options);
    createMixableOptions(info, options);
    createWrappableOptions(info, options);
    createWildcardOptions(info, options);
    createElementTypeInfosOptions(info, options);
    options.append("type", this.codeModel.string("elementRefs"));
    return options;
  }
View Full Code Here

    return classInfoMappings;
  }

  public JSObjectLiteral compileClassInfo(MClassInfo<T, C> classInfo) {
    final JsonixModule module = getModule(classInfo);
    final JSObjectLiteral classInfoMapping = this.codeModel.object();
    classInfoMapping.append("type", this.codeModel.string("classInfo"));
    classInfoMapping.append("localName",
        this.codeModel.string(classInfo.getLocalName()));

    final MClassInfo<T, C> baseTypeInfo = classInfo.getBaseTypeInfo();
    if (baseTypeInfo != null) {
      classInfoMapping.append("baseTypeInfo",
          getTypeInfoDeclaration(baseTypeInfo));
    }
    classInfoMapping.append("propertyInfos",
        compilePropertyInfos(classInfo));
    module.registerTypeInfo(classInfoMapping);
    return classInfoMapping;
  }
View Full Code Here

TOP

Related Classes of org.hisrc.jscm.codemodel.expression.JSObjectLiteral

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.