Class ClassLoaderFactory
java.lang.Object
com.github.fungal.api.classloading.ClassLoaderFactory
Class loader factory
- Author:
- Jesper Pedersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intType: Exportstatic final intType: Parent firststatic final intType: Parent last -
Method Summary
Modifier and TypeMethodDescriptionstatic KernelClassLoadercreate(int type, URL[] urls, ClassLoader parent) Create a class loader
-
Field Details
-
TYPE_PARENT_FIRST
public static final int TYPE_PARENT_FIRSTType: Parent first- See Also:
-
TYPE_PARENT_LAST
public static final int TYPE_PARENT_LASTType: Parent last- See Also:
-
TYPE_EXPORT
public static final int TYPE_EXPORTType: Export- See Also:
-
-
Method Details
-
create
public static KernelClassLoader create(int type, URL[] urls, ClassLoader parent) throws IllegalArgumentException, IllegalStateException Create a class loader- Parameters:
type- The class loader typeurls- The resource URLsparent- The parent class loader- Returns:
- The kernel class loader
- Throws:
IllegalArgumentException- Thrown if unknown type is passedIllegalStateException- Thrown if a classloader can't be created
-