Class Loader


  • @Deprecated(since="2022-01-27")
    public class Loader
    extends java.lang.Object
    Deprecated.
    This internal logback API is not supported by AEM as a Cloud Service.
    Load resources (or images) from various sources.
    • Constructor Summary

      Constructors 
      Constructor Description
      Loader()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.lang.ClassLoader getClassLoaderAsPrivileged​(java.lang.Class<?> clazz)
      Deprecated.
      Returns the class loader of clazz in an access privileged section.
      static java.lang.ClassLoader getClassLoaderOfClass​(java.lang.Class<?> clazz)
      Deprecated.
      Return the class loader which loaded the class passed as argument.
      static java.lang.ClassLoader getClassLoaderOfObject​(java.lang.Object o)
      Deprecated.
      Get the class loader of the object passed as argument.
      static java.net.URL getResource​(java.lang.String resource, java.lang.ClassLoader classLoader)
      Deprecated.
      Search for a resource using the classloader passed as parameter.
      static java.net.URL getResourceBySelfClassLoader​(java.lang.String resource)
      Deprecated.
      Attempt to find a resource by using the classloader that loaded this class, namely Loader.class.
      static java.util.Set<java.net.URL> getResources​(java.lang.String resource, java.lang.ClassLoader classLoader)
      Deprecated.
      Compute the number of occurrences a resource can be found by a class loader.
      static java.lang.ClassLoader getTCL()
      Deprecated.
      Get the Thread Context Loader which is a JDK 1.2 feature.
      static java.lang.Class<?> loadClass​(java.lang.String clazz)
      Deprecated.
      If running under JDK 1.2 load the specified class using the Thread contextClassLoader if that fails try Class.forname.
      static java.lang.Class<?> loadClass​(java.lang.String clazz, Context context)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

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

      • IGNORE_TCL_PROPERTY_NAME

        public static final java.lang.String IGNORE_TCL_PROPERTY_NAME
        Deprecated.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Loader

        public Loader()
        Deprecated.
    • Method Detail

      • getResources

        public static java.util.Set<java.net.URL> getResources​(java.lang.String resource,
                                                               java.lang.ClassLoader classLoader)
                                                        throws java.io.IOException
        Deprecated.
        Compute the number of occurrences a resource can be found by a class loader.
        Parameters:
        resource -
        classLoader -
        Returns:
        Throws:
        java.io.IOException
      • getResource

        public static java.net.URL getResource​(java.lang.String resource,
                                               java.lang.ClassLoader classLoader)
        Deprecated.
        Search for a resource using the classloader passed as parameter.
        Parameters:
        resource - the resource name to look for
        classLoader - the classloader used for the search
      • getResourceBySelfClassLoader

        public static java.net.URL getResourceBySelfClassLoader​(java.lang.String resource)
        Deprecated.
        Attempt to find a resource by using the classloader that loaded this class, namely Loader.class.
        Parameters:
        resource -
        Returns:
      • getTCL

        public static java.lang.ClassLoader getTCL()
        Deprecated.
        Get the Thread Context Loader which is a JDK 1.2 feature. If we are running under JDK 1.1 or anything else goes wrong the method returns null.
      • loadClass

        public static java.lang.Class<?> loadClass​(java.lang.String clazz,
                                                   Context context)
                                            throws java.lang.ClassNotFoundException
        Deprecated.
        Throws:
        java.lang.ClassNotFoundException
      • getClassLoaderOfObject

        public static java.lang.ClassLoader getClassLoaderOfObject​(java.lang.Object o)
        Deprecated.
        Get the class loader of the object passed as argument. Return the system class loader if appropriate.
        Parameters:
        o -
        Returns:
      • getClassLoaderAsPrivileged

        public static java.lang.ClassLoader getClassLoaderAsPrivileged​(java.lang.Class<?> clazz)
        Deprecated.
        Returns the class loader of clazz in an access privileged section.
        Parameters:
        clazz -
        Returns:
      • getClassLoaderOfClass

        public static java.lang.ClassLoader getClassLoaderOfClass​(java.lang.Class<?> clazz)
        Deprecated.
        Return the class loader which loaded the class passed as argument. Return the system class loader if appropriate.
        Parameters:
        clazz -
        Returns:
      • loadClass

        public static java.lang.Class<?> loadClass​(java.lang.String clazz)
                                            throws java.lang.ClassNotFoundException
        Deprecated.
        If running under JDK 1.2 load the specified class using the Thread contextClassLoader if that fails try Class.forname. Under JDK 1.1 only Class.forName is used.
        Throws:
        java.lang.ClassNotFoundException