public final class ResourceManager extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
clearResourceCache()
Clear the cache of all resources currently loaded into the
system.
|
static Resources |
getBaseResources(String baseName)
Retrieve resource with specified base name.
|
static Resources |
getBaseResources(String baseName,
ClassLoader classLoader)
Retrieve resource with specified base name.
|
static Resources |
getClassResources(Class clazz)
Retrieve resource for specified Class.
|
static String |
getClassResourcesBaseName(Class clazz)
Retrieve resource base name for specified Class.
|
static Resources |
getPackageResources(Class clazz)
Retrieve resource for specified Classes package.
|
static String |
getPackageResourcesBaseName(Class clazz)
Retrieve resource base name for specified Classes package.
|
static Resources |
getResources(String name)
Retrieve resource for specified name.
|
public static Resources getBaseResources(String baseName)
baseName - the base namepublic static Resources getBaseResources(String baseName, ClassLoader classLoader)
baseName - the base nameclassLoader - the classLoader to load resources frompublic static void clearResourceCache()
throws SecurityException
Note that the caller must have been granted the
"i18n.clearCompleteCache" RuntimePermission or
else a security exception will be thrown.
SecurityException - if the caller does not have
permission to clear cachepublic static Resources getResources(String name)
name - the name to use when looking up resourcespublic static Resources getPackageResources(Class clazz)
clazz - the Classpublic static Resources getClassResources(Class clazz)
clazz - the Classpublic static String getPackageResourcesBaseName(Class clazz)
clazz - the ClassCopyright © 2005–2020. All rights reserved.