|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.util.ResourceResolver
public class 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 java.net.URL |
getClassPathResource(java.lang.String res)
Resolves the given string and returns an URL. |
static java.net.URL |
getFileResource(java.lang.String res)
Resolves the given string and returns an URL. |
static java.net.URL |
getResource(java.lang.String res)
Tries to resolve the given string by all methods available to this class. |
static java.net.URL |
getResource(java.lang.String systemRes,
java.lang.String userHomeRes,
java.lang.String classPathRes)
Tries to resolve the given strings in the given order. |
static java.net.URL |
getSystemResource(java.lang.String res)
Resolves the given string and returns an URL. |
static java.net.URL |
getURLResource(java.lang.String res)
Resolves the given string and returns an URL. |
static java.net.URL |
getUserHomeResource(java.lang.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 java.net.URL getResource(java.lang.String systemRes, java.lang.String userHomeRes, java.lang.String classPathRes)
systemRes
- The key of a key-value pair passed to the
virtual machine with the -D option. Resolved with
getSystemResource(String)
userHomeRes
- A user home relative path. Resolved with
getUserHomeResource(String)
classPathRes
- A path relative to the classpath of the
virtual machine. Resolved with
getClassPathResource(String)
public static java.net.URL getUserHomeResource(java.lang.String res)
res
- A user home relative pathpublic static java.net.URL getClassPathResource(java.lang.String res)
res
- A path relative to the classpath of the
virtual machine.public static java.net.URL getURLResource(java.lang.String res)
res
- A string representation of an urlpublic static java.net.URL getFileResource(java.lang.String res)
null
is returned.
res
- A string representation of a file path.public static java.net.URL getSystemResource(java.lang.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 java.net.URL getResource(java.lang.String res)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |