Package com.helger.io.clazz
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 TypeMethodDescriptionstatic @Nullable InputStreamgetResourceAsStream(@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
-
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 aroundclass.getResourceAsStream (sPath).- Parameters:
aClass- The class to be used. May not benull.sPath- The path to be resolved. May neither benullnor empty. Internally it is ensured that the provided path does start with a slash.- Returns:
nullif the path could not be resolved using the specified class loader.
-