Scala-friendly, fast class-finder library (using ASM under the covers)
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Updated activator. Mar 28, 2017
libexec
notes
project bump sbt-coursier to latest stable version Oct 26, 2018
src
.gitignore
.travis.yml
CHANGELOG.md
LICENSE.md
README.md
build.sbt

README.md

classutil: Fast class finder utilities, plus some extras

Build Status Maven Central

Introduction

The org.clapper.classutil (ClassUtil) library is a Scala package that provides various class location and class generation capabilities, including:

  • Methods to locate and filter classes quickly, at runtime—more quickly, in fact, than can be done with the JVM's runtime reflection capabilities.
  • Methods for converting Scala maps into Java Beans, on the fly—which can be useful when generating data for use with APIs (e.g., template APIs) that accept Java Beans, but not maps.

Under the covers, ClassUtil uses the ASM bytecode library, though it can be extended to use a different byte code library.

ClassUtil is fast for several reasons:

  • A bytecode library like ASM loads compiled bytecode without using a JVM class loader. So, it avoids all the class loader's overhead.
  • ClassUtil's class-finder methods load and return information about classes using an efficient lazy iterator, which offers minimal startup penalty and the ability to cut the traversal short.

Please see the full documentation on the library's home page for all the gory details, including caveats.

ClassUtil is copyright © 2010-2018 Brian M. Clapper and is released under a new BSD license.