cn.dreampie.common.util.scan
类 Scaner<S>
java.lang.Object
cn.dreampie.common.util.scan.Scaner<S>
- 直接已知子类:
- AnnotationScaner, ClassScaner, FileScaner
public abstract class Scaner<S>
- extends Object
Created by ice on 14-12-19.
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
classLoader
protected ClassLoader classLoader
scanInJar
protected boolean scanInJar
targetPattern
protected String targetPattern
targetSuffix
protected String targetSuffix
includePathOrPackages
protected Set<String> includePathOrPackages
Scaner
public Scaner()
checkTarget
protected boolean checkTarget(Object target)
packageFilePathSolve
protected String packageFilePathSolve(String filePath)
jarFilePathSolve
protected String jarFilePathSolve(String filePath)
urlSolve
protected Enumeration<URL> urlSolve(String baseDir)
scanInJar
protected S scanInJar(boolean scanInJar)
targetPattern
protected S targetPattern(String targetPattern)
scanToClass
public <T> Set<Class<? extends T>> scanToClass()
- scan to Class
- 类型参数:
T - 返回的lcass类型
- 返回:
- 搜索到的class
scanToFile
public Set<File> scanToFile()
- scan to File
- 返回:
scan
public Set<String> scan()
findFiles
protected Set<String> findFiles(String baseDirName,
String targetFileName)
- 递归查找文件
- 参数:
baseDirName - 查找的文件夹路径targetFileName - 需要查找的文件名
include
public Scaner include(String... pathOrPackages)
include
public Scaner include(Set<String> pathOrPackages)
Copyright © 2017. All rights reserved.