Beispiel #1
0
 // FIXME deal with interfaces/implementations
 public final void addFrom(final IJavaElement scope, final SubProgressMonitor progressMonitor)
     throws CoreException {
   progressMonitor.beginTask("Adding resources and resourceMethods", 1);
   HTTPMethods httpMethods = metamodel.getHttpMethods();
   List<IType> javaTypes =
       JAXRSAnnotationsScanner.findResources(scope, httpMethods.getTypeNames(), progressMonitor);
   for (IType javaType : javaTypes) {
     try {
       resources.put(
           javaType.getFullyQualifiedName(), new Resource(javaType, metamodel, progressMonitor));
     } catch (InvalidModelElementException e) {
       Logger.warn(
           "Type '"
               + javaType.getFullyQualifiedName()
               + "' is not a valid JAX-RS Resource: "
               + e.getMessage());
     }
   }
 }