|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.specrunner.util.resources.ResourceFinder
public class ResourceFinder
Resources utilities.
| Field Summary | |
|---|---|
protected static ICache<String,List<URL>> |
cache
Cache of resources. |
static String |
FEATURE_COMPARATOR
Comparator feature. |
| Constructor Summary | |
|---|---|
ResourceFinder()
|
|
| Method Summary | |
|---|---|
List<URL> |
filter(List<URL> resources)
Filter resources. |
List<URL> |
getAllResources(String resource)
List of all resource URLs associated to a given file, including its suffix '_default' corresponding version. |
Comparator<URL> |
getComparator()
Get the resources comparator. |
String |
getDefault(String resource)
Get default name for resource files. |
List<URL> |
getResources(String resource)
Find a given file in classloader. |
URL |
getSpecific(String resource)
Get the most specific file. |
protected void |
log(String msg,
List<URL> files)
Print load information. |
void |
setComparator(Comparator<URL> comparator)
Set the comparator. |
List<URL> |
sort(List<URL> resources)
Sort the resources using reverse order. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FEATURE_COMPARATOR
protected static ICache<String,List<URL>> cache
| Constructor Detail |
|---|
public ResourceFinder()
| Method Detail |
|---|
public Comparator<URL> getComparator()
public void setComparator(Comparator<URL> comparator)
comparator - Comparator.public String getDefault(String resource)
resource - The resource name.
public URL getSpecific(String resource)
throws IOException
resource - The resource.
IOException - On lookup errors.
public List<URL> getAllResources(String resource)
throws IOException
resource - The resource file.
IOException - On lookup error.
protected void log(String msg,
List<URL> files)
msg - A message.files - The resource list.
public List<URL> getResources(String resource)
throws IOException
resource - The resource name.
IOException - On loading list errors.public List<URL> filter(List<URL> resources)
resources - The resources.
public List<URL> sort(List<URL> resources)
resources - The resources.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||