Package apigen.adt

Examples of apigen.adt.ListType


      Iterator<Type> types = api.typeIterator(moduleName);

      while (types.hasNext()) {
        Type type = types.next();
        if (type instanceof ListType) {
          ListType listType = (ListType) type;
          JavaGenerationParameters params = getJavaGenerationParameters();
          String typeName = TypeGenerator.qualifiedClassName(params,
              type.getId());
          String methodName = "make" + TypeGenerator.className(type);
          String paramTypeName = TypeGenerator.qualifiedClassName(
              params, listType.getElementType());
          String empty = emptyListVariable(type);

          if (type instanceof SeparatedListType) {
            SeparatedListType sepListType = (SeparatedListType) type;
            genMakeEmptyList(typeName, methodName, empty,
                forwarding, moduleName);
            genMakeSingletonSeparatedList(typeName, methodName,
                paramTypeName, sepListType, empty, forwarding,
                moduleName);
            genMakeManySeparatedList(sepListType.getElementType(),
                typeName, methodName, paramTypeName,
                sepListType, forwarding, moduleName);
            if (!forwarding) {
              genMakeManySeparatedTermList(typeName, methodName,
                  sepListType);
            }
            genMakeFixedSizedSeparatedList(typeName, methodName,
                sepListType, forwarding, moduleName);
            genReverseSeparatedLists(sepListType, methodName,
                forwarding, moduleName);
            genConcatSeparatedLists(sepListType, methodName,
                forwarding, moduleName);
            genAppendSeparatedLists(sepListType, methodName,
                forwarding, moduleName);
          } else {
            genMakeEmptyList(typeName, methodName, empty,
                forwarding, moduleName);
            genMakeSingletonList(typeName, methodName,
                paramTypeName, empty, forwarding, moduleName);
            genMakeManyList(listType.getElementType(), typeName,
                methodName, paramTypeName, forwarding,
                moduleName);
            if (!forwarding) {
              genMakeManyTermList(typeName, methodName);
            }
View Full Code Here

TOP

Related Classes of apigen.adt.ListType

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.