use of org.glassfish.jersey.server.wadl.internal.generators.WadlGeneratorJAXBGrammarGenerator in project jersey by jersey.
the class WadlGeneratorLoader method loadWadlGenerators.
static WadlGenerator loadWadlGenerators(List<WadlGenerator> wadlGenerators) throws Exception {
WadlGenerator wadlGenerator = new WadlGeneratorJAXBGrammarGenerator();
if (wadlGenerators != null && !wadlGenerators.isEmpty()) {
for (WadlGenerator generator : wadlGenerators) {
generator.setWadlGeneratorDelegate(wadlGenerator);
wadlGenerator = generator;
}
}
wadlGenerator.init();
return wadlGenerator;
}
use of org.glassfish.jersey.server.wadl.internal.generators.WadlGeneratorJAXBGrammarGenerator in project jersey by jersey.
the class WadlGeneratorLoader method loadWadlGeneratorDescriptions.
static WadlGenerator loadWadlGeneratorDescriptions(InjectionManager injectionManager, List<WadlGeneratorDescription> wadlGeneratorDescriptions) throws Exception {
WadlGenerator wadlGenerator = new WadlGeneratorJAXBGrammarGenerator();
final CallbackList callbacks = new CallbackList();
try {
if (wadlGeneratorDescriptions != null && !wadlGeneratorDescriptions.isEmpty()) {
for (WadlGeneratorDescription wadlGeneratorDescription : wadlGeneratorDescriptions) {
final WadlGeneratorControl control = loadWadlGenerator(injectionManager, wadlGeneratorDescription, wadlGenerator);
wadlGenerator = control.wadlGenerator;
callbacks.add(control.callback);
}
}
wadlGenerator.init();
} finally {
callbacks.callback();
}
return wadlGenerator;
}
Aggregations