Package org.eclipse.jetty.util
Class Loader
- java.lang.Object
-
- org.eclipse.jetty.util.Loader
-
@Deprecated(since="2021-05-27") public class Loader extends java.lang.Object
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.ClassLoader Helper. This helper class allows classes to be loaded either from the Thread's ContextClassLoader, the classloader of the derived class or the system ClassLoader. Usage:public class MyClass { void myMethod() { ... Class c=Loader.loadClass(this.getClass(),classname); ... }
-
-
Constructor Summary
Constructors Constructor Description Loader()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.net.URL
getResource(java.lang.String name)
Deprecated.static java.util.ResourceBundle
getResourceBundle(java.lang.String name, boolean checkParents, java.util.Locale locale)
Deprecated.static java.lang.Class
loadClass(java.lang.Class loaderClass, java.lang.String name)
Deprecated.Load a class.static java.lang.Class
loadClass(java.lang.String name)
Deprecated.Load a class.
-
-
-
Method Detail
-
getResource
public static java.net.URL getResource(java.lang.String name)
Deprecated.
-
loadClass
public static java.lang.Class loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
Deprecated.Load a class.Load a class either from the thread context classloader or if none, the system loader
- Parameters:
name
- the name of the new class to load- Returns:
- Class
- Throws:
java.lang.ClassNotFoundException
- if not able to find the class
-
loadClass
public static java.lang.Class loadClass(java.lang.Class loaderClass, java.lang.String name) throws java.lang.ClassNotFoundException
Deprecated.Load a class. Load a class from the same classloader as the passedloadClass
, or if none then useloadClass(String)
- Parameters:
loaderClass
- a similar class, belong in the same classloader of the desired class to loadname
- the name of the new class to load- Returns:
- Class
- Throws:
java.lang.ClassNotFoundException
- if not able to find the class
-
getResourceBundle
public static java.util.ResourceBundle getResourceBundle(java.lang.String name, boolean checkParents, java.util.Locale locale) throws java.util.MissingResourceException
Deprecated.- Throws:
java.util.MissingResourceException
-
-