Package com.google.gxp.compiler.base

Examples of com.google.gxp.compiler.base.NativeType


  protected InstanceType instanceType(SourcePosition pos, String dottedName) {
    return new InstanceType(pos, "InstanceType", fqTemplateName(dottedName));
  }

  protected NativeType nativeType(SourcePosition pos, String type) {
    return new NativeType(pos, "NativeType", new MultiLanguageAttrValue(type));
  }
View Full Code Here


   * @return a String representing the validated type
   */
  public static String validateConjunctiveType(AlertSink alertSink, NativeType type) {
    List<String> subTypes = Lists.newArrayList();
    for (String subType : type.getNativeType(OutputLanguage.JAVA).split("&")) {
      subTypes.add(validateType(alertSink, new NativeType(type, subType)));
    }

    return Joiner.on(" & ").join(subTypes);
  }
View Full Code Here

      }

      // build an appropriate type
      Type type = (gxpType != null) ? createGxpType(node, attrMap, gxpType)
          : (contentType != null) ? createContentType(node, null)
          : (defaultType == null || !nativeType.isEmpty()) ? new NativeType(node, nativeType)
          : defaultType;

      if (type != null && type.onlyAllowedInParam() && !forParam) {
        alertSink.add(new InvalidTypeError(type));
        type = null;
View Full Code Here

    public Void visitImplementsElement(GxpNamespace.GxpElement node) {
      AttributeMap attrMap = nodeParts.getAttributes();
      String interfaceType = attrMap.getOptional(JavaNamespace.INSTANCE, "interface", null);
      if (interfaceType != null) {
        NativeType type = new NativeType(node, interfaceType);
        output.accumulate(new NativeImplementsDeclaration(node, type));
      } else {
        interfaceType = attrMap.get("interface", null);
        if (interfaceType != null) {
          TemplateName templateName = TemplateName.create(null, interfaceType);
View Full Code Here

    public Void visitTypeParamElement(GxpNamespace.GxpElement node) {
      AttributeMap attrMap = nodeParts.getAttributes();
      String name = getVariableName(attrMap, "name", false);
      String extendsType = attrMap.getOptional("extends", null);
      if (name != null) {
        NativeType type = (extendsType == null)
            ? null : new NativeType(node, extendsType);
        output.accumulate(new FormalTypeParameter(node, name, type));
      }
      return null;
    }
View Full Code Here

      }

      // build an appropriate type
      Type type = (gxpType != null) ? createGxpType(node, attrMap, gxpType)
          : (contentType != null) ? createContentType(node, null)
          : (defaultType == null || !nativeType.isEmpty()) ? new NativeType(node, nativeType)
          : defaultType;

      if (type != null && type.onlyAllowedInParam() && !forParam) {
        alertSink.add(new InvalidTypeError(type));
        type = null;
View Full Code Here

    public Void visitImplementsElement(GxpNamespace.GxpElement node) {
      AttributeMap attrMap = nodeParts.getAttributes();
      String interfaceType = attrMap.getOptional(JavaNamespace.INSTANCE, "interface", null);
      if (interfaceType != null) {
        NativeType type = new NativeType(node, interfaceType);
        output.accumulate(new NativeImplementsDeclaration(node, type));
      } else {
        interfaceType = attrMap.get("interface", null);
        if (interfaceType != null) {
          TemplateName templateName = TemplateName.create(null, interfaceType);
View Full Code Here

    public Void visitTypeParamElement(GxpNamespace.GxpElement node) {
      AttributeMap attrMap = nodeParts.getAttributes();
      String name = getVariableName(attrMap, "name", false);
      String extendsType = attrMap.getOptional("extends", null);
      if (name != null) {
        NativeType type = (extendsType == null)
            ? null : new NativeType(node, extendsType);
        output.accumulate(new FormalTypeParameter(node, name, type));
      }
      return null;
    }
View Full Code Here

   * @return a String representing the validated type
   */
  public static String validateConjunctiveType(AlertSink alertSink, NativeType type) {
    List<String> subTypes = Lists.newArrayList();
    for (String subType : type.getNativeType(OutputLanguage.JAVA).split("&")) {
      subTypes.add(validateType(alertSink, new NativeType(type, subType)));
    }

    return Joiner.on(" & ").join(subTypes);
  }
View Full Code Here

   * @return a String representing the validated type
   */
  public static String validateConjunctiveType(AlertSink alertSink, NativeType type) {
    List<String> subTypes = Lists.newArrayList();
    for (String subType : type.getNativeType(OutputLanguage.SCALA).split("&")) {
      subTypes.add(validateType(alertSink, new NativeType(type, subType)));
    }

    return Joiner.on(" & ").join(subTypes);
  }
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.base.NativeType

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.