Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## toxi.util.datatypes
Class SingletonRegistry

    java.lang.Object
      toxi.util.datatypes.SingletonRegistry

    public class SingletonRegistry

extends java.lang.Object

Implements a registry for dynamic singleton management. Use this registry instead of using "new" to enforce singletons of any class with a visible default constructor. The registry itself is implemented as singleton.

Field Summary
`static SingletonRegistry` | `REGISTRY` The singleton instance of the registry itself.

Method Summary
`static java.lang.Object` | `getInstanceOf(java.lang.String className)` Creates or returns an instance of the class requested by name.
`static SingletonRegistry` | `getRegistry()` Alternative, more conventional accessor to the singleton instance of the registry itself.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### REGISTRY

    public static final SingletonRegistry REGISTRY

  The singleton instance of the registry itself.

Method Detail

### getInstanceOf

    public static java.lang.Object getInstanceOf(java.lang.String className)

  Creates or returns an instance of the class requested by name.

  Parameters:
    `className` -
  Returns:
    class singleton instance

### getRegistry

    public static SingletonRegistry getRegistry()

  Alternative, more conventional accessor to the singleton instance of the registry itself.

  Returns:
    registry instance

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD