|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.util.ResourceResolver
This class translates strings to URLs. Strings come from different contexts and hence can be interpreted differently when forming an URL from that string. This class tries to cover most translation cases in which a string somehow serves as a description of a resource.
Method Summary | |
static URL |
getClassPathResource(String res)
Resolves the given string and returns an URL. |
static URL |
getFileResource(String res)
Resolves the given string and returns an URL. |
static URL |
getResource(String res)
Tries to resolve the given string by all methods available to this class. |
static URL |
getResource(String systemRes,
String userHomeRes,
String classPathRes)
Tries to resolve the given strings in the given order. |
static URL |
getSystemResource(String res)
Resolves the given string and returns an URL. |
static URL |
getURLResource(String res)
Resolves the given string and returns an URL. |
static URL |
getUserHomeResource(String res)
Resolves the given string and returns an URL. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static URL getResource(String systemRes, String userHomeRes, String classPathRes)
systemRes
- The key of a key-value pair passed to the
virtual machine with the -D option. Resolved with
ResourceResolver.getSystemResource(String)
userHomeRes
- A user home relative path. Resolved with
ResourceResolver.getUserHomeResource(String)
classPathRes
- A path relative to the classpath of the
virtual machine. Resolved with
ResourceResolver.getClassPathResource(String)
public static URL getUserHomeResource(String res)
res
- A user home relative pathpublic static URL getClassPathResource(String res)
res
- A path relative to the classpath of the
virtual machine.public static URL getURLResource(String res)
res
- A string representation of an urlpublic static URL getFileResource(String res)
null
is returned.
res
- A string representation of a file path.public static URL getSystemResource(String res)
res
- The key of a key-value pair passed to the
virtual machine with the -D option. The value of this
key-value pair can signify a (user home relative) file,
an url, and a classpath relative path.public static URL getResource(String res)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |