while(typeIterator.hasNext())
{
Object highLevelType = typeIterator.next();
if(!(highLevelType instanceof BaseType))
{
DefinedType type = (DefinedType)highLevelType;
if(!type.getQName().getLocalPart().toString().startsWith(">"))
{
// System.out.println( "HERE "+type.getQName().getLocalPart());
HashSet nestedTypes = type.getNestedTypes(symbolTable, true);
Iterator iterator = nestedTypes.iterator();
while(iterator.hasNext())
{
Object nestedObjectType = iterator.next();
if(nestedObjectType instanceof DefinedType)
{
//System.out.println( "nestedname"+nestedObjectType);
DefinedType nestedType =(DefinedType) nestedObjectType;
// If the nested parts are complex inner/anonymous types then they need to be exposed as seperate classes
String name =nestedType.getQName().getLocalPart().toString();
// System.out.println( "iterator next = "+name);
if(name.startsWith(">") && name.lastIndexOf(">")>0)
{
// then this type needs to be exposed !
QName oldName = nestedType.getQName();
// System.out.println( "Exposing nestedType "+oldName);
// System.out.println( "nestobjecttype = "+nestedObjectType.getClass());
// QName newTypeName = new QName(oldName.getNamespaceURI(), oldName.getLocalPart().substring(1));
QName newTypeName =new QName(oldName.getNamespaceURI(), CUtils.sanitiseClassName(oldName.getLocalPart().toString()));