Class ClassHelperExt

java.lang.Object
com.helger.base.lang.clazz.ClassHelper
com.helger.io.clazz.ClassHelperExt

@Immutable public final class ClassHelperExt extends com.helger.base.lang.clazz.ClassHelper
Class helper methods.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable InputStream
    getResourceAsStream(@NonNull Class<?> aClass, @NonNull @Nonempty String sPath)
    Get the input stream of the passed resource using the class loader of the specified class only.

    Methods inherited from class com.helger.base.lang.clazz.ClassHelper

    areConvertibleClasses, getAllPrimitiveClasses, getAllPrimitiveWrapperClasses, getClass, getClassFromPath, getClassLocalName, getClassLocalName, getClassLocalName, getClassName, getClassPackageName, getClassPackageName, getClassPackageName, getDirectoryFromPackage, getDirectoryFromPackage, getPathFromClass, getPathFromClass, getPrimitiveClass, getPrimitiveWrapperClass, getResource, getSafeClassName, internalGetPathWithLeadingSlash, isAbstractClass, isAnnotationClass, isArrayClass, isBooleanClass, isCharacterClass, isEnumClass, isFloatingPointClass, isInstancableClass, isIntegerClass, isInterface, isPrimitiveType, isPrimitiveWrapperType, isPublic, isPublicClass, isStringClass

    Methods inherited from class java.lang.Object

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

    • getResourceAsStream

      public static @Nullable InputStream getResourceAsStream(@NonNull Class<?> aClass, @Nonempty @NonNull @Nonempty String sPath)
      Get the input stream of the passed resource using the class loader of the specified class only. This is a sanity wrapper around class.getResourceAsStream (sPath).
      Parameters:
      aClass - The class to be used. May not be null.
      sPath - The path to be resolved. May neither be null nor empty. Internally it is ensured that the provided path does start with a slash.
      Returns:
      null if the path could not be resolved using the specified class loader.