code: @SuppressWarnings("unchecked")
      public <T extends ObjectAttachableListener> ListenerManager<T> addObjectListener(
              Class<?> objectClass, long objectId, Class<T> listenerClass, T listener) {
          Map<ObjectAttachableListener, ListenerManagerImpl<? extends ObjectAttachableListener>> listeners =
                  objectListeners
                          .computeIfAbsent(objectClass, key -> new ConcurrentHashMap<>())
                          .computeIfAbsent(objectId, key -> new ConcurrentHashMap<>())
                          .computeIfAbsent(listenerClass, c -> Collections.synchronizedMap(new LinkedHashMap<>()));
          return (ListenerManager<T>) listeners.computeIfAbsent(
                  listener, key -> new ListenerManagerImpl<>(this, listener, listenerClass, objectClass, objectId));
      }
docs: Adds an object listener.
  Adding a listener multiple times to the same object will only add it once
  and return the same listener manager on each invocation.
  The order of invocation is according to first addition.
  
  @param objectClass The class of the object.
  @param objectId The id of the object.
  @param listenerClass The listener class.
  @param listener The listener to add.
  @param <T> The type of the listener.
  @return The manager for the added listener.