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.
java.net.URL , org.springframework.core.io.ResourceEditor , org.springframework.core.io.ResourceLoader , FileEditor, InputStreamEditor
| Modifier and Type | Field and Description |
|---|---|
| private final ResourceEditor |
| Access | Constructor and Description |
|---|---|
| public | |
| public | URLEditor(ResourceEditor
the ResourceEditor to use resourceEditor)Create a new URLEditor, using the given ResourceEditor underneath. |
| Modifier and Type | Method and Description |
|---|---|
| public String | getAsText()
Overrides java. Implements java. Gets the property value as a string suitable for presentation to a human to edit. |
| public void | setAsText(String
The string to be parsed. text)Overrides java. Implements java. Sets the property value by parsing a given String. |
| resourceEditor | back to summary |
|---|---|
| private final ResourceEditor resourceEditor | |
| URLEditor | back to summary |
|---|---|
| public URLEditor() Create a new URLEditor, using a default ResourceEditor underneath. | |
| URLEditor | back to summary |
|---|---|
| public URLEditor(ResourceEditor resourceEditor) Create a new URLEditor, using the given ResourceEditor underneath.
| |
| getAsText | back to summary |
|---|---|
| public String getAsText() Overrides java. Implements java. Doc from java. Gets the property value as a string suitable for presentation to a human to edit. | |
| setAsText | back to summary |
|---|---|
| public void setAsText(String text) throws IllegalArgumentException Overrides java. Implements java. Doc from java. Sets the property value by parsing a given String. May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text. | |