Create Java Mode enum
Merge pull request #2291 from gmethvin/mode_enum

Create Java Mode enum