code: @Override
    public void addHandler(Handler handler)
    {
      synchronized (this) {
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        
        if (loader == null) {
          loader = _systemClassLoader;
        }
  
        boolean hasLoader = false;
        for (int i = _loaders.size() - 1; i >= 0; i--) {
          WeakReference<ClassLoader> ref = _loaders.get(i);
          ClassLoader refLoader = ref.get();
  
          if (refLoader == null)
            _loaders.remove(i);
  
          if (refLoader == loader)
            hasLoader = true;
  
          if (isParentLoader(loader, refLoader))
            addHandler(handler, refLoader);
        }
  
        if (! hasLoader) {
          _loaders.add(new WeakReference<ClassLoader>(loader));
          addHandler(handler, loader);
          EnvLoader.addClassLoaderListener(this, loader);
        }
  
        HandlerEntry ownHandlers = _ownHandlers.get();
        if (ownHandlers == null) {
          ownHandlers = new HandlerEntry(this);
          _ownHandlers.set(ownHandlers);
        }
      
        ownHandlers.addHandler(handler);
      }
    }
docs: Adds a handler.