Singleton pattern for sorts in java backend

ready for review
why not definition.subsorts()?