Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Scala-friendly, fast class-finder library (using ASM under the covers)
Pull request Compare This branch is 58 commits behind bmc:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

classutil: Fast class finder utilities, plus some extras


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.

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

Something went wrong with that request. Please try again.