Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Latest commit

 

History

History
26 lines (21 loc) · 574 Bytes

README.md

File metadata and controls

26 lines (21 loc) · 574 Bytes

Package Scanner - The missing scanner in Java world

扫描出指定包下所有的类名。

Quick Start

指定包名:

	PkgScanner scanner = new PkgScanner("cn.fh.pkgscanner");
	List<String> list = scanner.scan();

	list.forEach( f -> System.out.println(f));

输出结果:

cn.fh.pkgscanner.PathUtils
cn.fh.pkgscanner.PkgScanner
cn.fh.pkgscanner.ResourceType

指定包名和注解名:

	PkgScanner scanner = new PkgScanner("cn.fh.pkgscanner", Component.class);
	List<String> list = scanner.scan();

	list.forEach( f -> System.out.println(f));