public final class DelayedBindRegistry extends Object
DelayedBind
interface. These classes should be eager singletons and they should register
themselves with the DelayedBindRegistry
in their constructor by
calling register(DelayedBind)
.Constructor and Description |
---|
DelayedBindRegistry() |
Modifier and Type | Method and Description |
---|---|
static void |
bind(Ginjector ginjector)
Bind all the registered classes, by calling their
DelayedBind.delayedBind(Ginjector) method. |
static Ginjector |
getGinjector()
Access the ginjector that was bound to this
DelayedBindRegistry . |
static void |
register(DelayedBind delayedBindObject)
Registers a new object so that it is bound using delayed binding.
|
public static void bind(Ginjector ginjector)
DelayedBind.delayedBind(Ginjector)
method. This method should only be
called once, typically when the program starts.ginjector
- The Ginjector
from which to get object instances.public static void register(DelayedBind delayedBindObject)
DelayedBind
interface.delayedBindObject
- The object to register.public static Ginjector getGinjector()
DelayedBindRegistry
.Ginjector
.Copyright © 2010–2014 Arcbees. All rights reserved.