code: public void registerMonitor(Monitor monitor) {
          if (monitors == null) {
              monitors = new CopyOnWriteArrayList<>();
          }
          monitors.add(monitor);
      }
docs: Register {@link Monitor} which will be called the graph is about to inject or release an object
  
  @param monitor The monitor