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);
}