|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cruxframework.crux.core.ioc.IocContainerConfigurations
public abstract class IocContainerConfigurations
Base class for an IoC configuration class. Crux engine search for all subclasses of IocContainerConfigurations and invoke their configure method.
| Constructor Summary | |
|---|---|
IocContainerConfigurations()
|
|
| Method Summary | ||
|---|---|---|
protected
|
bindType(Class<T> clazz)
Call this method on your configure method to create a configuration for some Type. |
|
protected boolean |
isEnabled()
Override this method if you need to specify some conditions that enables your configuration. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.cruxframework.crux.core.ioc.IocConfiguration |
|---|
configure |
| Constructor Detail |
|---|
public IocContainerConfigurations()
| Method Detail |
|---|
protected <T> IocConfig<T> bindType(Class<T> clazz)
You can write something like:
bindType(List.class).toClass(ArrayList.class);
That would cause Crux to inject a new instance of ArrayList whenever you declare
a field of type List annotated with Inject
T - clazz -
protected boolean isEnabled()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||