public class AntLoader extends PatternLoader implements Loader
ResourceLoader.ResourceEnumeratordelegate| Constructor and Description |
|---|
AntLoader() |
AntLoader(ClassLoader classLoader) |
AntLoader(Loader delegate) |
| Modifier and Type | Method and Description |
|---|---|
protected Filter |
filter(String ant)
根据资源表达式推导出资源过滤器
|
Enumeration<Resource> |
load(String pattern,
boolean recursively,
Filter filter)
加载匹配模式表达式的所有资源,由于模式表达式中有可能表达了是否递归加载的含义,
所以缺省情况下recursively参数会被忽略,取而代之的是
PatternLoader.recursively(String)的返回值,
如果字类实现的模式表达式并不能表达是否递归加载的含义,需要重写该方法以满足更多定制化的需求。
另外当filter参数不为null时,由模式表达式推导出的过滤器将会和filter参数混合成一个AllFilter混合过滤器 |
protected String |
path(String ant)
根据资源表达式推导出资源根路径
|
protected boolean |
recursively(String ant)
根据资源表达式推导出是否从根路径开始递归加载
|
load, load, loadpublic AntLoader()
public AntLoader(ClassLoader classLoader)
public AntLoader(Loader delegate)
public Enumeration<Resource> load(String pattern, boolean recursively, Filter filter) throws IOException
PatternLoaderPatternLoader.recursively(String)的返回值,
如果字类实现的模式表达式并不能表达是否递归加载的含义,需要重写该方法以满足更多定制化的需求。
另外当filter参数不为null时,由模式表达式推导出的过滤器将会和filter参数混合成一个AllFilter混合过滤器load in interface Loaderload in class PatternLoaderpattern - 模式表达式recursively - 递归加载filter - 过滤器IOException - I/O 异常protected String path(String ant)
PatternLoaderpath in class PatternLoaderant - 资源表达式protected boolean recursively(String ant)
PatternLoaderrecursively in class PatternLoaderant - 资源表达式protected Filter filter(String ant)
PatternLoaderfilter in class PatternLoaderant - 资源表达式Copyright © 2019. All rights reserved.