public class DefaultResourceLoader extends java.lang.Object implements ResourceLoader
ResourceLoader
that uses the ClassLoader
of a certain Class
to load resources.Modifier and Type | Field and Description |
---|---|
protected java.lang.ClassLoader |
classLoader |
Constructor and Description |
---|
DefaultResourceLoader(java.lang.ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
protected java.util.ResourceBundle.Control |
getControl() |
java.lang.ClassLoader |
getLoader() |
int |
hashCode() |
java.util.ResourceBundle |
loadResource(java.lang.String name,
java.util.Locale locale)
Attempts to load a new
ResourceBundle for the given
combination of Locale and name . |
void |
setLoader(java.lang.ClassLoader classLoader) |
public DefaultResourceLoader(java.lang.ClassLoader classLoader)
clazz
- protected java.util.ResourceBundle.Control getControl()
public java.lang.ClassLoader getLoader()
public void setLoader(java.lang.ClassLoader classLoader)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.util.ResourceBundle loadResource(java.lang.String name, java.util.Locale locale)
ResourceLoader
ResourceBundle
for the given
combination of Locale
and name
. Implementations
should throw an MissingResourceException
when encountering
errors or when there is no matching resource data in the
domain of this ResourceLoader
.loadResource
in interface ResourceLoader
name
- abstract identifier for the resource in questionlocale
- the Locale
associated with the resource
in questionResourceBundle
for the given combination of
Locale
and name
ResourceLoader.loadResource(java.lang.String, java.util.Locale)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()