code: public static synchronized Enumeration<Stack> getStacks() {
      List<Stack> result = new CopyOnWriteArrayList<Stack>();
      if (!initialized) {
        initialize();
      }
      // Gets the classloader of the code that called this method, may be null.
      ClassLoader callerCL = ClassLoader.getSystemClassLoader();
      // Walk through the loaded stacks.
      for (StackInfo di : stacks) {
        // If the caller does not have permission to load the stack then skip it.
        if (getCallerClass(callerCL, di.stackClassName) != di.stackClass) {
          println(new StringBuilder().append("    skipping: ").append(di).toString());
          continue;
        }
        result.add(di.stack);
      }
  
      return Collections.enumeration(result);
    }
docs: Retrieves an Enumeration with all of the currently loaded Diameter stacks
  to which the current caller has access.
  
  <P><B>Note:</B> The classname of a stack can be found using
  <CODE>d.getClass().getName()</CODE>
  
  @return the list of Diameter stacks loaded by the caller's class loader