SingletonClass for java