Skip to main content
jCoderZ.org / Java tooling collective
  1. Home
  2. fawkeZ
  3. Wiki
  4. Utility classes

fawkeZ wiki / last edited 13 December 2006

Utility classes

A reference list of the Java types and helper classes that ship with the fawkeZ commons module.

The fawkeZ project contains a set of Java types and utility classes. Several of them are especially useful for avoiding null pointer exceptions, and the rest remove small pieces of repeated code from application classes.

Types

The types live in the org.jcoderz.commons.types package.

TypePurpose
DateA date value type used across the project.
PeriodA period between two dates.
YearMonthA year and month value.

Utilities

The utilities live in the org.jcoderz.commons.util package.

ClassPurpose
ArraysUtilArray helpers.
AssertNull assertion helpers.
Base64UtilBase64 encoder and decoder.
ConstantsShared constant definitions.
DbUtilDatabase helpers.
EmptyIteratorAn iterator with no elements.
FileUtilsFile helpers.
HashCodeA hash code value type.
HashCodeUtilHash code calculation helpers.
HexUtilHexadecimal conversion helpers.
IoUtilInput and output helpers.
JarUtilJar file helpers.
JaxbUtilJAXB helpers.
JmsUtilJMS helpers.
LoggingProxyA proxy that logs calls to an interface.
LuhnAlgorithmChecksum validation.
ObjectUtilObject comparison helpers.
RandomUtilRandom value helpers.
SerializableIteratorA serializable iterator wrapper.
StringUtilString helpers.
ThrowableUtilThrowable formatting helpers.
XmlFilterBaseBase class for XML filters.
XmlUtilXML helpers.
XsdUtilXML schema helpers.

Why the assertion class matters

A null pointer exception is usually a symptom, not a cause. The assertion class makes the precondition explicit at the point where a value enters a method, so the stack trace points at the real defect rather than at the line that happened to dereference the value much later.

Where to read the source

The classes were published in the Subversion trunk. The archive keeps the source tree listing, and the simple types generator explains how the strong types in the same module are produced.

References