code: private boolean hasScopeAnnotation(final Class<?> type, final boolean hkManaged) {
          boolean found = false;
          for (Annotation ann : type.getAnnotations()) {
              final Class<? extends Annotation> annType = ann.annotationType();
              if (annType.isAnnotationPresent(Scope.class)) {
                  found = true;
                  break;
              }
              // guice has special marker annotation
              if (!hkManaged && annType.isAnnotationPresent(ScopeAnnotation.class)) {
                  found = true;
                  break;
              }
          }
          return found;
      }
docs: Checks scope annotation presence directly on bean. Base classes are not checked as scope is not
  inheritable.
  
  @param type      bean type
  @param hkManaged true if bean is going to be managed by hk, false for guice management
  @return true if scope annotation found, false otherwise