de.jstacs
Class Singleton.SingletonHandler
java.lang.Object
de.jstacs.Singleton.SingletonHandler
- Enclosing interface:
- Singleton
public static class Singleton.SingletonHandler
- extends Object
This handler helps to retrieve the single instance of a Singleton
.
- Author:
- Jens Keilwagen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Singleton.SingletonHandler
public Singleton.SingletonHandler()
getSingelton
public static Singleton getSingelton(Class<? extends Singleton> singletonClass)
throws SecurityException,
NoSuchFieldException,
IllegalArgumentException,
IllegalAccessException
- This method helps to retrieve the single instance of a
Singleton
singletonClass
.
- Parameters:
singletonClass
- the class for which the
- Returns:
- the single instance of the given class
- Throws:
SecurityException
- forwarded from Class.getField(String)
NoSuchFieldException
- forwarded from Class.getField(String)
IllegalArgumentException
- forwarded from Field.get(Object)
IllegalAccessException
- forwarded from Field.get(Object)