de.jstacs
Class Singleton.SingletonHandler

java.lang.Object
  extended by 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

Constructor Summary
Singleton.SingletonHandler()
           
 
Method Summary
static Singleton getSingelton(Class<? extends Singleton> singletonClass)
          This method helps to retrieve the single instance of a Singleton singletonClass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Singleton.SingletonHandler

public Singleton.SingletonHandler()
Method Detail

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)