Package apigen.adt

Examples of apigen.adt.Location


  private void genGetFieldBody(Type type, Field field, String field_type_name) {
    Iterator<Location> locs = field.locationIterator();
    boolean first = true;

    while (locs.hasNext()) {
      Location loc = locs.next();
      print("  ");
      if (first) {
        first = false;
      } else {
        print("else ");
      }
      if (locs.hasNext()) {
        println("if (" + buildIsAltName(type, loc.getAltId())
            + "(arg)) {");
      } else {
        println("");
      }
      print("    return (" + field_type_name + ")");
      Iterator<Step> steps = loc.stepIterator();
      String type_getter = genATermToBuiltin(field.getType(),
          genGetterSteps(steps, "arg"));
      print(type_getter);
      println(";");
      if (locs.hasNext()) {
View Full Code Here


    printFoldOpen(decl);
    println(decl + " {");
    Iterator<Location> locs = field.locationIterator();
    boolean first = true;
    while (locs.hasNext()) {
      Location loc = locs.next();
      print("  ");
      if (first) {
        first = false;
      } else {
        print("else ");
      }
      println("if (" + buildIsAltName(type, loc.getAltId()) + "(arg)) {");
      print("    return (" + typeName + ")");
      Iterator<Step> steps = loc.stepIterator();
      String arg = genBuiltinToATerm(field.getType(), StringConversions
          .makeIdentifier(field.getId()));
      genSetterSteps(steps, new LinkedList<Step>(), arg);
      println(";");
      println("  }");
View Full Code Here

    println(decl + " {");
    // println("{");
    Iterator<Location> locs = field.locationIterator();
    boolean first = true;
    while (locs.hasNext()) {
      Location loc = locs.next();
      print("  ");
      if (first) {
        first = false;
      } else {
        print("else ");
      }
      println("if (" + buildIsAltName(type, loc.getAltId()) + "(arg)) {");
      println("    return ATtrue;");
      println("  }");
    }
    println("  return ATfalse;");
    println("}");
View Full Code Here

TOP

Related Classes of apigen.adt.Location

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.