code: public boolean hasApplicationContext() {
          String filter = getApplicationContextFilter(bundleContext.getBundle().getSymbolicName());
          ServiceReference<?>[] references = null;
          try {
              references = bundleContext.getServiceReferences(getContainerClass().getName(), filter);
          } catch (InvalidSyntaxException e) {
              throw new IllegalStateException("not possible", e);
          }
          return references != null && references.length != 0;
      }
docs: <p>hasApplicationContext.</p>
  
  @return a boolean.