squirrel-foundation provided a lightweight, easy use, type safe and highly extensible state machine implementation for Java.