code: public List<JavaResource> getProjectInjectableBeans(Project project)
     {
        final List<JavaResource> beans = new ArrayList<>();
        if (project != null)
        {
           project.getFacet(JavaSourceFacet.class).visitJavaSources(new JavaResourceVisitor()
           {
              @Override
              public void visit(VisitContext context, JavaResource resource)
              {
                 try
                 {
                    JavaSource<?> javaSource = resource.getJavaType();
                    if (!javaSource.isAnnotation() && !javaSource.isEnum()
                             // CDI
                             && !javaSource.hasAnnotation(Decorator.class)
                             && !javaSource.hasAnnotation(Interceptor.class)
                             // EJB
                             && !javaSource.hasAnnotation(MessageDriven.class)
                             // JPA
                             && !javaSource.hasAnnotation(Entity.class)
                             && !javaSource.hasAnnotation(Embeddable.class)
                             && !javaSource.hasAnnotation(MappedSuperclass.class)
                             // JSF
                             && !javaSource.hasAnnotation(FacesConverter.class)
                             && !javaSource.hasAnnotation(FacesValidator.class)
                             // REST
                             && !javaSource.hasAnnotation(Path.class)
                             // Servlet
                             && !javaSource.hasAnnotation(WebServlet.class)
                             && !javaSource.hasAnnotation(WebFilter.class)
                             && !javaSource.hasAnnotation(WebListener.class)
                             // Bean Validation
                             && !javaSource.hasImport(ConstraintValidator.class)
                             && !javaSource.hasImport(Payload.class)
                    )
                    {
                       beans.add(resource);
                    }
                 }
                 catch (ResourceException | FileNotFoundException e)
                 {
                    // ignore
                 }
              }
           });
        }
        return beans;
     }
docs: Returns all the injectable objects from the given {@link Project}. Most of the Java EE components can be injected,
  except JPA entities, message driven beans....