Package apigen.adt.api.types

Examples of apigen.adt.api.types.Separators


    String makeClassName = "make" + className;
    String manyPattern = patternListVariable(type);
    String elementType = type.getElementType();
    // String elementClass = TypeGenerator.className(elementType);
    // String elementClassFromTerm = elementClass + "FromTerm";
    Separators separators = type.getSeparators();
    int headLength = 1 + separators.getLength(); // on the ATerm level
    int tailIndex = 1 + type.countSeparatorFields(); // on the abstract
    // level

    println("  public " + returnTypeName + " " + className
        + "FromTerm(aterm.ATerm trm) {");
View Full Code Here


        return processConstructors(typeId, moduleName, alts);
    }

    private Type processSeparatedList(String typeId, String moduleName, Entry entry) {
        String elementType = ((ATermAppl) entry.getElemSort()).getAFun().getName();
        Separators separators = entry.getSeparators();
        SeparatedListType type = new SeparatedListType(typeId, moduleName, elementType, separators, factory);
        type.addAlternatives();
        types.add(type);
        return type;
    }
View Full Code Here

  }

  private String buildSeparatorPattern() {
    StringBuffer pattern = new StringBuffer();
    Separators runner = separators;

    while (!runner.isEmpty()) {
      Separator sep = runner.getHead();

      pattern.append(sep.toString());
      runner = runner.getTail();

      if (!runner.isEmpty()) {
        pattern.append(',');
      }
    }
    return pattern.toString();
  }
View Full Code Here

TOP

Related Classes of apigen.adt.api.types.Separators

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.