Package com.google.gwt.core.ext.typeinfo

Examples of com.google.gwt.core.ext.typeinfo.JEnumType


      } while (search != null);
    }

    // The fields that should be preserved from being pruned
    JField[] serializableFields;
    JEnumType enumType = serializableClass.isEnum();
    if (enumType != null) {
      serializableFields = enumType.getFields();
    } else {
      serializableFields = SerializationUtils.getSerializableFields(typeOracle,
          serializableClass);
    }
View Full Code Here


    return methodList.toArray(new MetaMethod[methodList.size()]);
  }

  private List<MetaMethod> getSpecialTypeMethods() {
    final List<MetaMethod> meths = new ArrayList<MetaMethod>();
    final JEnumType type = getEnclosedMetaObject().isEnum();

    if (type != null) {
      meths.add(new GWTSpecialMethod(this, DefModifiers.none(), Scope.Public, String.class, "name"));
      meths.add(new GWTSpecialMethod(this, DefModifiers.none(), Scope.Public, Enum.class, "valueOf", Parameter.of(
          String.class, "p").getMetaParameter()));
View Full Code Here

    return methodList.toArray(new MetaMethod[methodList.size()]);
  }

  private List<MetaMethod> getSpecialTypeMethods() {
    final List<MetaMethod> meths = new ArrayList<MetaMethod>();
    final JEnumType type = getEnclosedMetaObject().isEnum();

    if (type != null) {
      meths.add(new GWTSpecialMethod(this, DefModifiers.none(), Scope.Public, String.class, "name"));
      meths.add(new GWTSpecialMethod(this, DefModifiers.none(), Scope.Public, Enum.class, "valueOf", Parameter.of(String.class, "p").getMetaParameter()));
      meths.add(new GWTSpecialMethod(this, DefModifiers.none(), Scope.Public, Enum[].class, "values"));
View Full Code Here

    return methodList.toArray(new MetaMethod[methodList.size()]);
  }

  private List<MetaMethod> getSpecialTypeMethods() {
    final List<MetaMethod> meths = new ArrayList<MetaMethod>();
    final JEnumType type = getEnclosedMetaObject().isEnum();

    if (type != null) {
      meths.add(new GWTSpecialMethod(this, DefModifiers.none(), Scope.Public, String.class, "name"));
      meths.add(new GWTSpecialMethod(this, DefModifiers.none(), Scope.Public, Enum.class, "valueOf", Parameter.of(
          String.class, "p").getMetaParameter()));
View Full Code Here

    String size = panelElem.consumeRequiredDoubleAttribute("barHeight");
    if ("".equals(size)) {
      writer.die(panelElem, "barHeight attribute is required");
    }

    JEnumType unitEnumType = writer.getOracle().findType(
        Unit.class.getCanonicalName()).isEnum();
    String unit = panelElem.consumeAttributeWithDefault("barUnit",
        String.format("%s.%s", unitEnumType.getQualifiedSourceName(), "PX"),
        unitEnumType);

    writer.setFieldInitializerAsConstructor(fieldName,
        writer.getOracle().findType(TabLayoutPanel.class.getName()), size, unit);
View Full Code Here

  public void parse(XMLElement elem, String fieldName, JClassType type,
      UiBinderWriter writer) throws UnableToCompleteException {
    // Generate instantiation (requires a 'unit' ctor param).
    // (Don't generate a ctor for the SplitLayoutPanel, it has its own parser).
    if (type != getSplitLayoutPanelType(writer)) {
      JEnumType unitEnumType = writer.getOracle().findType(
          Unit.class.getCanonicalName()).isEnum();
      String unit = elem.consumeAttributeWithDefault("unit",
          String.format("%s.%s", unitEnumType.getQualifiedSourceName(), "PX"),
          unitEnumType);
      writer.setFieldInitializerAsConstructor(fieldName,
          writer.getOracle().findType(DockLayoutPanel.class.getName()), unit);
    }
View Full Code Here

  private static final String STACK = "stack";

  public void parse(XMLElement panelElem, String fieldName, JClassType type,
      UiBinderWriter writer) throws UnableToCompleteException {

    JEnumType unitEnumType = writer.getOracle().findType(
        Unit.class.getCanonicalName()).isEnum();
    String unit = panelElem.consumeAttributeWithDefault("unit",
        String.format("%s.%s", unitEnumType.getQualifiedSourceName(), "PX"),
        unitEnumType);

    writer.setFieldInitializerAsConstructor(fieldName,
        writer.getOracle().findType(StackLayoutPanel.class.getName()),
        unit);
View Full Code Here

      } while (search != null);
    }

    // The fields that should be preserved from being pruned
    JField[] serializableFields;
    JEnumType enumType = serializableClass.isEnum();
    if (enumType != null) {
      serializableFields = enumType.getFields();
    } else {
      serializableFields = SerializationUtils.getSerializableFields(typeOracle,
          serializableClass);
    }
View Full Code Here

    if (typeArray != null) {
      endVisit(typeArray);
      return;
    }

    JEnumType typeEnum = type.isEnum();
    if (typeEnum != null) {
      endVisit(typeEnum);
      return;
    }
View Full Code Here

    if (rtn != null || types.length > 1) {
      return rtn;
    }

    /* Maybe it's an enum */
    JEnumType enumType = types[0].isEnum();
    if (enumType != null) {
      return new EnumAttributeParser(converter, enumType, logger);
    }

    /*
 
View Full Code Here

TOP

Related Classes of com.google.gwt.core.ext.typeinfo.JEnumType

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.