resources-scanner

A tools for scans resources and classes.

License

License

GroupId

GroupId

com.fixiu
ArtifactId

ArtifactId

resources-scanner
Last Version

Last Version

1.0.1-RELEASE
Release Date

Release Date

Type

Type

jar
Description

Description

resources-scanner
A tools for scans resources and classes.
Project URL

Project URL

https://github.com/dongyushuai/resources-scanner
Source Code Management

Source Code Management

https://github.com/dongyushuai/resources-scanner

Download resources-scanner

How to add to project

<!-- https://jarcasting.com/artifacts/com.fixiu/resources-scanner/ -->
<dependency>
    <groupId>com.fixiu</groupId>
    <artifactId>resources-scanner</artifactId>
    <version>1.0.1-RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/com.fixiu/resources-scanner/
implementation 'com.fixiu:resources-scanner:1.0.1-RELEASE'
// https://jarcasting.com/artifacts/com.fixiu/resources-scanner/
implementation ("com.fixiu:resources-scanner:1.0.1-RELEASE")
'com.fixiu:resources-scanner:jar:1.0.1-RELEASE'
<dependency org="com.fixiu" name="resources-scanner" rev="1.0.1-RELEASE">
  <artifact name="resources-scanner" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.fixiu', module='resources-scanner', version='1.0.1-RELEASE')
)
libraryDependencies += "com.fixiu" % "resources-scanner" % "1.0.1-RELEASE"
[com.fixiu/resources-scanner "1.0.1-RELEASE"]

Dependencies

compile (4)

Group / Artifact Type Version
com.google.android : android Optional jar 4.1.1.4
org.jboss : jboss-vfs Optional jar 3.2.15.Final
org.osgi : org.osgi.core Optional jar 6.0.0
org.slf4j : slf4j-api Optional jar 1.7.30

Project Modules

There are no modules declared in this project.

Resources and classes scanner

1. Description

Scans the given locations for resources, and classes

2. Maven

<dependency>
	<groupId>com.fixiu</groupId>
	<artifactId>resources-scanner</artifactId>
	<version>1.0.0-RELEASE</version>
</dependency>

3. Usage

// 1.Define locations to scan
List<Location> locations = new Locations("to/**/?/./your").getLocations();
// 2.Initialization the Scanner
Scanner<YourClass> scanner = new Scanner<>(YourClass.class, locations, Thread.currentThread().getContextClassLoader(), StandardCharsets.UTF_8, resourceNameCache, locationScannerCache);
/*** or using default parameter to initialization the Scanner ***/
Scanner<YourClass> scanner = new Scanner<>(Object.class, locations);
// 3.Get resources or classes
Collection<LoadableResource> resources = scanner.getResources();
Collection<Class<? extends YourClass>> classes = scanner.getClasses();

Versions

Version
1.0.1-RELEASE
1.0.0-RELEASE