- Added
ClassUtil utility module, with some useful utility methods,
including: isPrimitive() methods that test objects and classes to see
if they represent primitives; an isOfType method that uses a Scala
Manifest to allow runtime tests against generic types; and a
loadClass method that simplifies loading a class from its bytes.
- Added
ScalaObjectToBean, which takes a Scala object and creates a Java
bean that wraps it, at runtime.
- Added
ClassNameGenerator, which generates class names automatically.
- Refactored various internal implementation details, for ease of re-use.
- Updated to released 1.2 version of ScalaTest and converted its
dependency in SBT to a test-time, not run-time, dependency.
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.