new HashMap<String, AbstractResource>();
for (final Map.Entry<String, Object> e : resourceConfig.getExplicitRootResources().entrySet()) {
final Object o = e.getValue();
final Class c = (o instanceof Class) ? (Class)o : o.getClass();
final AbstractResource ar = new AbstractResource(e.getKey(),
wa.getAbstractResource(c));
rootResourcesSet.add(ar);
explicitRootResources.put(e.getKey(), ar);
}
// Initiate the WADL with the root resources
initWadl(rootResourcesSet);
// Process singleton instances of root resource classes
for (final Object o : singletons) {
final AbstractResource ar = wa.getAbstractResource(o);
// Configure meta-data
wa.initiateResource(ar, o);
final ComponentInjector ci = new ComponentInjector(injectableFactory, o.getClass());
ci.inject(o);
addRule(ar.getPath().getValue(), o);
}
// Process root resource classes
for (final Class<?> c : classes) {
final AbstractResource ar = wa.getAbstractResource(c);
// Configure meta-data
wa.initiateResource(ar);
addRule(ar.getPath().getValue(), c);
}
// Process explicit root resources
for (final Map.Entry<String, Object> e : resourceConfig.getExplicitRootResources().entrySet()) {
final String path = e.getKey();