? SourceGenerator.CODE_TYPE_GRAMMAR : SourceGenerator.CODE_TYPE_PROXY;
sg.generateSource(wadl, outDir, codeType);
// compile
if (context.optionSet(WadlToolConstants.CFG_COMPILE)) {
ClassCollector collector = createClassCollector();
List<String> generatedServiceClasses = sg.getGeneratedServiceClasses();
for (String className : generatedServiceClasses) {
int index = className.lastIndexOf(".");
collector.addServiceClassName(className.substring(0, index),
className.substring(index + 1),
className);
}
List<String> generatedTypeClasses = sg.getGeneratedTypeClasses();
for (String className : generatedTypeClasses) {
int index = className.lastIndexOf(".");
collector.addTypesClassName(className.substring(0, index),
className.substring(index + 1),
className);
}
context.put(ClassCollector.class, collector);