pMethod.addLine(list, ".add(", itemType.getSimpleTypeSG().getCastFromString(pMethod, new Object[]{st, ".nextToken()"}, pData),
");");
pMethod.addEndFor();
if ("indexed".equals(collectionType)) {
JavaQName iType = itemType.getSimpleTypeSG().getRuntimeType();
return new TypedValueImpl(new Object[]{"((", iType, ") ", list, ".toArray(new ", iType, "[", list, ".size()]))"},
itemType.getSimpleTypeSG().getRuntimeType());
} else {
JavaQName myListType = JavaQNameImpl.getInstance(collectionType, true);
return new TypedValueImpl(list, myListType);
}
}