Package apigen.adt

Examples of apigen.adt.Field


  protected String buildActualNullArgumentList(Iterator<Field> fields) {
    JavaGenerationParameters params = getJavaGenerationParameters();
    StringBuffer buf = new StringBuffer();

    while (fields.hasNext()) {
      Field field = fields.next();
      buf.append('(');
      buf.append(TypeGenerator
          .qualifiedClassName(params, field.getType()));
      buf.append(") null");

      if (fields.hasNext()) {
        buf.append(", ");
      }
View Full Code Here


  protected String buildFormalTypedArgumentList(Iterator<Field> fields) {
    JavaGenerationParameters params = getJavaGenerationParameters();
    StringBuffer buf = new StringBuffer();

    while (fields.hasNext()) {
      Field field = fields.next();
      String type = field.getType();
      buf.append(TypeGenerator.qualifiedClassName(params, type));
      buf.append(' ');
      buf.append(getFieldId(field.getId()));

      if (fields.hasNext()) {
        buf.append(", ");
      }
    }
View Full Code Here

  }

  private void genSeparatorInitAssignments(SeparatedListType type) {
    Iterator<Field> fields = type.separatorFieldIterator();
    while (fields.hasNext()) {
      Field field = fields.next();
      String fieldId = JavaGenerator.getFieldId(field.getId());
      println("    this." + fieldId + " = " + fieldId + ";");
    }
  }
View Full Code Here

  }

  private void genSeparatorsGettersAndSetters() {
    Iterator<Field> fields = type.separatorFieldIterator();
    while (fields.hasNext()) {
      Field field = fields.next();
      genSeparatorGetterAndSetter(field);
    }
  }
View Full Code Here

  private void genSeparatorFields() {
    Iterator<Field> fields = type.separatorFieldIterator();

    while (fields.hasNext()) {
      Field field = fields.next();
      genSeparatorField(field);
    }
    println();
  }
View Full Code Here

  private String buildActualSeparatorArguments(SeparatedListType type) {
    Iterator<Field> fields = type.separatorFieldIterator();
    String result = "";

    while (fields.hasNext()) {
      Field field = fields.next();
      String fieldId = JavaGenerator.getFieldId(field.getId());
      // TODO: remove terminating ", "!
      result += fieldId + ", ";
    }

    return result;
View Full Code Here

  }

  private void genSeparatorFieldsEquivalentConjunction() {
    Iterator<Field> fields = type.separatorFieldIterator();
    while (fields.hasNext()) {
      Field field = fields.next();
      String fieldId = JavaGenerator.getFieldId(field.getId());
      String fieldType = field.getType();
      String fieldGetter = buildSeparatorFieldGetter(field);
      String equivalenceTest = EquivalentBuilder.buildEquivalent(
          fieldType, fieldId, "peer." + fieldGetter);
      print(" && " + equivalenceTest);
    }
View Full Code Here

  protected void genDefaultGetAndSetMethods(Type type) {
    Iterator<Field> fields = type.fieldIterator();

    while (fields.hasNext()) {
      Field field = fields.next();
      genDefaultGetAndSetMethod(type, field);
    }
  }
View Full Code Here

  protected void genDefaultHasMethods(Type type) {
    Iterator<Field> fields = type.fieldIterator();

    while (fields.hasNext()) {
      Field field = fields.next();
      genDefaultHasMethod(field);
    }
  }
View Full Code Here

      println("      result = " + makeMethodName + "(list.getHead(), "
          + sepArgs + "result);");

      Iterator<Field> seps = type.separatorFieldIterator();
      while (seps.hasNext()) {
        Field sep = seps.next();
        String fieldId = JavaGenerator.getFieldId(sep.getId());
        String fieldGet = "get"
            + StringConversions.makeCapitalizedIdentifier(sep
                .getId());
        println("      " + fieldId + " = list." + fieldGet + "();");

      }
      println("      list = list.getTail();");
View Full Code Here

TOP

Related Classes of apigen.adt.Field

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.