Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Java Metadata Scanner
Java
tree: 1a59abacff

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
.gitignore
LICENSE
LICENSE_HEADER
README.md
build.gradle

README.md

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).

Something went wrong with that request. Please try again.