code: public static void addDependency(Dependency depend,
                                     ClassLoader loader)
    {
      for (; loader != null; loader = loader.getParent()) {
        if (loader instanceof EnvironmentClassLoader) {
          ((EnvironmentClassLoader) loader).addDependency(depend);
          return;
        }
      }
    }
docs: Adds a dependency to the current environment.
  
  @param depend the dependency to add
  @param loader the context loader