final ClassLoader cl = Thread.currentThread().getContextClassLoader();
final ClassLoader ncl = new Loader(classpath.list(), this.getClass().getClassLoader());
Thread.currentThread().setContextClassLoader(ncl);
try {
ResourceConfig rc = new ClasspathResourceConfig(classpath.list());
rc.validate();
Set<AbstractResource> s = new HashSet<AbstractResource>();
for (Class c : rc.getRootResourceClasses()) {
s.add(IntrospectionModeller.createResource(c));
}
return new WadlBuilder().generate(s);