code: public Set<Privilege> scan() {
          StopWatch stopWatch = StopWatch.createStarted();
          Set<Privilege> preAuthPrivileges = reflections.getMethodsAnnotatedWith(PreAuthorize.class).stream()
              .map(element -> element.getAnnotation(PreAuthorize.class))
              .map(PreAuthorize::value)
              .map(this::parse)
              .collect(Collectors.toSet());
  
          Set<Privilege> postAuthPrivileges = reflections.getMethodsAnnotatedWith(PostAuthorize.class).stream()
              .map(element -> element.getAnnotation(PostAuthorize.class))
              .map(PostAuthorize::value)
              .map(this::parse)
              .collect(Collectors.toSet());
  
          Set<Privilege> findPrivileges = reflections.getMethodsAnnotatedWith(FindWithPermission.class).stream()
              .map(element -> element.getAnnotation(FindWithPermission.class))
              .map(FindWithPermission::value)
              .map(this::parse)
              .peek(privilege -> privilege.getResources().add("returnObject"))
              .collect(Collectors.toSet());
  
          Set<Privilege> postFilterPrivileges = reflections.getMethodsAnnotatedWith(PostFilter.class).stream()
              .map(element -> element.getAnnotation(PostFilter.class))
              .map(PostFilter::value)
              .map(this::parse)
              .peek(privilege -> privilege.getResources().add("returnObject"))
              .collect(Collectors.toSet());
  
          preAuthPrivileges.addAll(postAuthPrivileges);
          preAuthPrivileges.addAll(findPrivileges);
          preAuthPrivileges.addAll(postFilterPrivileges);
          log.info("Found {} privileges in {} ms", preAuthPrivileges.size(), stopWatch.getTime());
          return preAuthPrivileges;
      }
docs: Scan for {@link PreAuthorize} and {@link PostAuthorize} annotations
  and create {@link Set} of {@link Privilege}.
  
  @return set of privileges