CtPackage ctPackage = launcher.getFactory().Package().getOrCreate("com.example");
CtClass ctClass = launcher.getFactory().Class().create("com.example.TestClass1");
ctPackage.getTypes().add(ctClass);
HashSet<ModifierKind> modifiers = new HashSet<ModifierKind>();
modifiers.add(ModifierKind.PUBLIC);
CtTypeReference ctTypeRef = launcher.getFactory().Type().createReference(String.class.getName());
@SuppressWarnings("unused")
CtField ctField = launcher.getFactory().Field().create(ctClass, modifiers, ctTypeRef, "myField");
scanner.visitCtPackage(ctPackage);
XSDComplexTypeDefinition complexType = scanner.typeXSDComplexTypeMap.get(ctClass);