Class PathEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.springframework.beans.propertyeditors.PathEditor
- All Implemented Interfaces:
- PropertyEditor
Editor for 
java.nio.file.Path, to directly populate a Path
 property instead of using a String property as bridge.
 Based on Paths.get(URI)'s resolution algorithm, checking
 registered NIO file system providers, including the default file system
 for "file:..." paths. Also supports Spring-style URL notation: any fully
 qualified standard URL and Spring's special "classpath:" pseudo-URL, as
 well as Spring's context-specific relative file paths. As a fallback, a
 path will be resolved in the file system via Paths#get(String)
 if no existing context-relative resource could be found.
- Since:
- 4.3.2
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a new PathEditor, using the default ResourceEditor underneath.PathEditor(ResourceEditor resourceEditor) Create a new PathEditor, using the given ResourceEditor underneath.
- 
Method SummaryMethods inherited from class java.beans.PropertyEditorSupportaddPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
- 
Constructor Details- 
PathEditorpublic PathEditor()Create a new PathEditor, using the default ResourceEditor underneath.
- 
PathEditorCreate a new PathEditor, using the given ResourceEditor underneath.- Parameters:
- resourceEditor- the ResourceEditor to use
 
 
- 
- 
Method Details- 
setAsText- Specified by:
- setAsTextin interface- PropertyEditor
- Overrides:
- setAsTextin class- PropertyEditorSupport
- Throws:
- IllegalArgumentException
 
- 
getAsText- Specified by:
- getAsTextin interface- PropertyEditor
- Overrides:
- getAsTextin class- PropertyEditorSupport
 
 
-