Single-class semantic version implementation for java