Package com.jogamp.common.util
Class IOUtil.ClassResources
java.lang.Object
com.jogamp.common.util.IOUtil.ClassResources
- Enclosing class:
- IOUtil
Helper compound associating a class instance and resource paths
to be
resolved at a later time.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ClassLoaderfinal Class<?>Optional class instance used toresolve(int)relativeresourcePaths.final String[]Resource paths, seeresolve(int). -
Constructor Summary
ConstructorsConstructorDescriptionClassResources(Class<?> contextCL, String[] resourcePaths) Deprecated.ClassResources(String[] resourcePaths, ClassLoader classLoader, Class<?> relContext) -
Method Summary
Modifier and TypeMethodDescriptionresolve(int uriIndex) Resolving one of theresourcePathsindexed byuriIndexusingclassLoader,contextCLthroughIOUtil.getResource(String, ClassLoader, Class).final intReturns the number of resources, i.e.
-
Field Details
-
classLoader
-
contextCL
Optional class instance used toresolve(int)relativeresourcePaths. -
resourcePaths
Resource paths, seeresolve(int).
-
-
Constructor Details
-
ClassResources
Deprecated.Use#IOUtil(String[], ClassLoader, Class)for clarity!- Parameters:
contextCL- class instance toresolve(int)resourcePaths.resourcePaths- array of strings denominating multiple resource paths. None shall be null.
-
ClassResources
- Parameters:
resourcePaths- multiple relative or absolute resource locationsclassLoader- optionalClassLoader, seeIOUtil.getResource(String, ClassLoader, Class)relContext- optional relative context, seeIOUtil.getResource(String, ClassLoader, Class)
-
-
Method Details
-
resourceCount
public final int resourceCount()Returns the number of resources, i.e.resourcePaths.length. -
resolve
Resolving one of theresourcePathsindexed byuriIndexusingclassLoader,contextCLthroughIOUtil.getResource(String, ClassLoader, Class).- Throws:
ArrayIndexOutOfBoundsException- ifuriIndexis < 0 or >=resourceCount().
-
#IOUtil(String[], ClassLoader, Class)for clarity!