Java state machine supporting most UML 2 features