Class ExtensionClassLoaders


  • public class ExtensionClassLoaders
    extends java.lang.Object
    Allows to register extension class loaders to be considered by JavaExtension.
    Author:
    Holger Eichelberger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.List<java.lang.ClassLoader> loaders  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.ClassLoader getLoader​(int index)
      Returns the specified loader.
      static int getLoaderCount()
      Returns the number of registered loaders.
      java.util.Iterator<java.lang.ClassLoader> getLoaders()
      Returns all loaders in terms of an iterator.
      static void registerLoader​(java.lang.ClassLoader loader)
      Registers the given loader.
      static void unregisterLoader​(java.lang.ClassLoader loader)
      Unregisters the specified loader.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • loaders

        private static java.util.List<java.lang.ClassLoader> loaders
    • Constructor Detail

      • ExtensionClassLoaders

        public ExtensionClassLoaders()
    • Method Detail

      • registerLoader

        public static void registerLoader​(java.lang.ClassLoader loader)
        Registers the given loader.
        Parameters:
        loader - the class loader to be registered (null is ignored)
      • unregisterLoader

        public static void unregisterLoader​(java.lang.ClassLoader loader)
        Unregisters the specified loader.
        Parameters:
        loader - the loader to be removed (null is ignored)
      • getLoaderCount

        public static int getLoaderCount()
        Returns the number of registered loaders.
        Returns:
        the number of loaders
      • getLoader

        public static java.lang.ClassLoader getLoader​(int index)
        Returns the specified loader.
        Parameters:
        index - the index of the loader to be returned
        Returns:
        the specified loader
        Throws:
        java.lang.IndexOutOfBoundsException - if index < 0 || index >= getLoaderCount()
      • getLoaders

        public java.util.Iterator<java.lang.ClassLoader> getLoaders()
        Returns all loaders in terms of an iterator.
        Returns:
        the iterator