类 PathEditor
- java.lang.Object
- java.beans.PropertyEditorSupport
- org.springframework.beans.propertyeditors.PathEditor
- 所有已实现的接口:
PropertyEditor
@UsesJava7 public class PathEditor extends PropertyEditorSupport
Editor forjava.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 viaPaths#get(String)
if no existing context-relative resource could be found.- 从以下版本开始:
- 4.3.2
- 作者:
- Juergen Hoeller
- 另请参阅:
Path
,Paths.get(URI)
,ResourceEditor
,ResourceLoader
,FileEditor
,URLEditor
构造器概要
构造器 构造器 说明 PathEditor()
Create a new PathEditor, using the default ResourceEditor underneath.PathEditor(ResourceEditor resourceEditor)
Create a new PathEditor, using the given ResourceEditor underneath.
构造器详细资料
PathEditor
public PathEditor()
Create a new PathEditor, using the default ResourceEditor underneath.
PathEditor
public PathEditor(ResourceEditor resourceEditor)
Create a new PathEditor, using the given ResourceEditor underneath.- 参数:
resourceEditor
- the ResourceEditor to use
方法详细资料
setAsText
public void setAsText(String text) throws IllegalArgumentException
- 指定者:
setAsText
在接口中PropertyEditor
- 覆盖:
setAsText
在类中PropertyEditorSupport
- 抛出:
IllegalArgumentException
getAsText
public String getAsText()
- 指定者:
getAsText
在接口中PropertyEditor
- 覆盖:
getAsText
在类中PropertyEditorSupport