org.springframework.core.io
Class ResourceEditor
java.lang.Object
|
+--java.beans.PropertyEditorSupport
|
+--org.springframework.core.io.ResourceEditor
- Direct Known Subclasses:
- ContextResourceEditor
- public class ResourceEditor
- extends PropertyEditorSupport
Editor for Resource descriptors, to convert String locations to Resource
properties automatically instead of using a String location property.
The path may contain ${...} placeholders, to be resolved as
system properties: e.g. ${user.dir}.
Will return an UrlResource if the location value is a URL, and a
ClassPathResource if it is a non-URL path or a "classpath:" pseudo-URL.
- Author:
- Juergen Hoeller
- Since: 28.12.2003
- See Also: PLACEHOLDER_PREFIX, PLACEHOLDER_SUFFIX, CLASSPATH_URL_PREFIX, Resource, java.lang.System.getProperty(java.lang.String)
Methods inherited from class java.beans.PropertyEditorSupport |
firePropertyChange, isPaintable, supportsCustomEditor, getCustomEditor, addPropertyChangeListener, removePropertyChangeListener, getValue, setValue, getAsText, getJavaInitializationString, getTags, paintValue |
Methods inherited from class java.lang.Object |
hashCode, notify, notifyAll, wait, wait, wait, getClass, equals, toString |
CLASSPATH_URL_PREFIX
public final static String CLASSPATH_URL_PREFIX
- Pseudo URL prefix for loading from the class path
PLACEHOLDER_PREFIX
public final static String PLACEHOLDER_PREFIX
PLACEHOLDER_SUFFIX
public final static String PLACEHOLDER_SUFFIX
setAsText
public void setAsText(String text)
throws java.lang.IllegalArgumentException
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
- Pseudo URL prefix for loading from the class path