public class URLEditor
extends java.beans.PropertyEditorSupport
java.net.URL
, to directly populate a URL property
instead of using a String property as bridge.
Supports Spring-style URL notation: any fully qualified standard URL ("file:", "http:", etc) and Spring's special "classpath:" pseudo-URL, as well as Spring's context-specific relative file paths.
Note: A URL must specify a valid protocol, else it will be rejected upfront. However, the target resource does not necessarily have to exist at the time of URL creation; this depends on the specific resource type.
URL
,
ResourceEditor
,
ResourceLoader
,
FileEditor
,
InputStreamEditor
Constructor and Description |
---|
URLEditor()
Create a new URLEditor, using the default ResourceEditor underneath.
|
URLEditor(ResourceEditor resourceEditor)
Create a new URLEditor, using the given ResourceEditor underneath.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAsText() |
void |
setAsText(java.lang.String text) |
public URLEditor()
public URLEditor(ResourceEditor resourceEditor)
resourceEditor
- the ResourceEditor to usepublic void setAsText(java.lang.String text) throws java.lang.IllegalArgumentException
setAsText
in interface java.beans.PropertyEditor
setAsText
in class java.beans.PropertyEditorSupport
java.lang.IllegalArgumentException
public java.lang.String getAsText()
getAsText
in interface java.beans.PropertyEditor
getAsText
in class java.beans.PropertyEditorSupport