Package io.github.connellite.jcl.context
Class JclContext
- java.lang.Object
-
- io.github.connellite.jcl.context.JclContext
-
public class JclContext extends Object
JclContext holds all the JarClassLoader instances so that they can be accessed from anywhere in the application.- Author:
- Kamran
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_NAME
-
Constructor Summary
Constructors Constructor Description JclContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddJcl(String name, JarClassLoader jcl)Populates the context with JarClassLoader instancesstatic voiddestroy()Clears the contextstatic JarClassLoaderget()static JarClassLoaderget(String name)static Map<String,JarClassLoader>getAll()static booleanisLoaded()
-
-
-
Field Detail
-
DEFAULT_NAME
public static final String DEFAULT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
isLoaded
public static boolean isLoaded()
-
addJcl
public void addJcl(String name, JarClassLoader jcl)
Populates the context with JarClassLoader instances- Parameters:
name-jcl-
-
destroy
public static void destroy()
Clears the context
-
get
public static JarClassLoader get()
-
get
public static JarClassLoader get(String name)
-
getAll
public static Map<String,JarClassLoader> getAll()
-
-