Class ClassLoaderHelper

java.lang.Object
software.amazon.awssdk.codegen.internal.ClassLoaderHelper

@Deprecated public final class ClassLoaderHelper extends Object
Deprecated.
should be replaced with ClassLoaderHelper
  • Method Summary

    Modifier and Type
    Method
    Description
    static URL
    getResource(String resource, boolean classesFirst, Class<?>... classes)
    Deprecated.
    If classesFirst is false, retrieves the resource via the context class loader of the current thread, and if not found, via the class loaders of the optionally specified classes in the order of their specification, and if not found, from the class loader of ClassLoaderHelper as the last resort.
    getResourceAsStream(String resource, boolean classesFirst, Class<?>... classes)
    Deprecated.
    If classesFirst is false, retrieves the resource as an input stream via the context class loader of the current thread, and if not found, via the class loaders of the optionally specified classes in the order of their specification, and if not found, from the class loader of ClassLoaderHelper as the last resort.
    getResourceAsStream(String resource, Class<?>... classes)
    Deprecated.
    Retrieves the resource as an input stream via the context class loader of the current thread, and if not found, via the class loaders of the optionally specified classes in the order of their specification, and if not found, from the class loader of ClassLoaderHelper as the last resort.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getResource

      public static URL getResource(String resource, boolean classesFirst, Class<?>... classes)
      Deprecated.
      If classesFirst is false, retrieves the resource via the context class loader of the current thread, and if not found, via the class loaders of the optionally specified classes in the order of their specification, and if not found, from the class loader of ClassLoaderHelper as the last resort.

      If classesFirst is true, retrieves the resource via the optionally specified classes in the order of their specification, and if not found, via the context class loader of the current thread, and if not found, from the class loader of ClassLoaderHelper as the last resort.

      Parameters:
      resource - resource to be loaded
      classesFirst - true if the class loaders of the optionally specified classes take precedence over the context class loader of the current thread; false if the opposite is true.
      classes - class loader providers
      Returns:
      the resource loaded as an URL or null if not found.
    • getResourceAsStream

      public static InputStream getResourceAsStream(String resource, Class<?>... classes)
      Deprecated.
      Retrieves the resource as an input stream via the context class loader of the current thread, and if not found, via the class loaders of the optionally specified classes in the order of their specification, and if not found, from the class loader of ClassLoaderHelper as the last resort.
      Parameters:
      resource - resource to be loaded
      classes - class loader providers
      Returns:
      the resource loaded as an input stream or null if not found.
    • getResourceAsStream

      public static InputStream getResourceAsStream(String resource, boolean classesFirst, Class<?>... classes)
      Deprecated.
      If classesFirst is false, retrieves the resource as an input stream via the context class loader of the current thread, and if not found, via the class loaders of the optionally specified classes in the order of their specification, and if not found, from the class loader of ClassLoaderHelper as the last resort.

      If classesFirst is true, retrieves the resource as an input stream via the optionally specified classes in the order of their specification, and if not found, via the context class loader of the current thread, and if not found, from the class loader of ClassLoaderHelper as the last resort.

      Parameters:
      resource - resource to be loaded
      classesFirst - true if the class loaders of the optionally specified classes take precedence over the context class loader of the current thread; false if the opposite is true.
      classes - class loader providers
      Returns:
      the resource loaded as an input stream or null if not found.