final WebApp webApp = new WebApp();
webApp.setContextRoot("/");
webApp.setId("web");
webApp.setVersion("2.5");
WebModule webModule = new WebModule(webApp, webApp.getContextRoot(), Thread.currentThread().getContextClassLoader(), "myapp", webApp.getId());
webModule.setFinder(new AnnotationFinder(new ClassesArchive(RESTClass.class, RESTMethod.class, RESTApp.class)).link());
final AnnotationDeployer annotationDeployer = new AnnotationDeployer();
webModule = annotationDeployer.deploy(webModule);
final Set<String> classes = webModule.getRestClasses();