Class ExtensionClassLoaders
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.templateModel.ExtensionClassLoaders
-
public class ExtensionClassLoaders extends java.lang.ObjectAllows to register extension class loaders to be considered byJavaExtension.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.List<java.lang.ClassLoader>loaders
-
Constructor Summary
Constructors Constructor Description ExtensionClassLoaders()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.ClassLoadergetLoader(int index)Returns the specified loader.static intgetLoaderCount()Returns the number of registered loaders.java.util.Iterator<java.lang.ClassLoader>getLoaders()Returns all loaders in terms of an iterator.static voidregisterLoader(java.lang.ClassLoader loader)Registers the given loader.static voidunregisterLoader(java.lang.ClassLoader loader)Unregisters the specified loader.
-
-
-
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- ifindex < 0 || index >=getLoaderCount()
-
getLoaders
public java.util.Iterator<java.lang.ClassLoader> getLoaders()
Returns all loaders in terms of an iterator.- Returns:
- the iterator
-
-