Scannit

An extensible Java Metadata/annotation scanner

License

License

GroupId

GroupId

nl.javadude.scannit
ArtifactId

ArtifactId

scannit
Last Version

Last Version

1.4.1
Release Date

Release Date

Type

Type

jar
Description

Description

Scannit
An extensible Java Metadata/annotation scanner
Project URL

Project URL

https://github.com/hierynomus/scannit
Source Code Management

Source Code Management

https://github.com/hierynomus/scannit/

Download scannit

How to add to project

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

Dependencies

compile (5)

Group / Artifact Type Version
de.schlichtherle.truezip : truezip-file jar 7.7.8
org.javassist : javassist jar 3.17.1-GA
de.schlichtherle.truezip : truezip-driver-zip jar 7.7.8
org.slf4j : slf4j-api jar 1.7.12
de.schlichtherle.truezip : truezip-kernel jar 7.7.8

test (4)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.1.3
org.hamcrest : hamcrest-library jar 1.3
junit : junit jar 4.12
org.hamcrest : hamcrest-core jar 1.3

Project Modules

There are no modules declared in this project.

Scannit: An (extensible) Java metadata scanner

Scannit is an extensible Java metadata scanner inspired upon scannotation and reflections. It currently contains scanners which scan the classpath for:

  • Class level annotations
  • Field level annotations
  • Method level annotations
  • Sub/Supertype hierarchy

Technology

Scannit relies on some libraries to provide services, these are:

  • Javassist: For the bytecode reading of classfiles
  • Truezip: For the scanning of the classpath and traversing through jars as though they're a filesystem
  • Guava: For the collections API

Usage

Configuration config = Configuration.config()
    .with(new SubTypeScanner(), new TypeAnnotationScanner())
    .scan("foo.bar");
Scannit scannit = new Scannit(config);
Set<Class<?>> clazzes = scannit.getTypesAnnotatedWith(MyAnnotation.class);
Set<Class<?>> subClazzes = scannit.getSubTypesOf(ParentClass.class);

Extension

Extending Scannit is pretty easy, you can write a new Scanner by extending nl.javadude.scannit.scanner.AbstractScanner and implementing void doScan(ClassFile file, Registry registry).

Versions

Version
1.4.1
1.4.0
1.3.1
1.3.0
1.2.1
1.2.0
1.1.0
1.0.2
1.0.1
1.0.0
0.14
0.13