add java implementation version of Singleton