org.cruxframework.crux.core.client.ioc
Class IocContainer

java.lang.Object
  extended by org.cruxframework.crux.core.client.ioc.IocContainer
All Implemented Interfaces:
ViewAware

public abstract class IocContainer
extends Object
implements ViewAware

Author:
Thiago da Rosa de Bustamante

Constructor Summary
IocContainer(View view)
          Constructor
 
Method Summary
protected  org.cruxframework.crux.core.client.ioc.IocScope _getScope(IoCResource.Scope scope)
          Retrieve the scope controller for the requested scope
<T> T
get(Class<T> clazz)
          Retrieve an object from IoCContainer
<T> T
get(Class<T> clazz, IoCResource.Scope scope)
          Retrieve an object from IoCContainer
<T> T
get(Class<T> clazz, IoCResource.Scope scope, String subscope)
          Retrieve an object from IoCContainer
 View getBoundCruxView()
           
 String getBoundCruxViewId()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IocContainer

public IocContainer(View view)
Constructor

Parameters:
view -
Method Detail

get

public <T> T get(Class<T> clazz)
Retrieve an object from IoCContainer

Parameters:
clazz - object class
Returns:
object instance

get

public <T> T get(Class<T> clazz,
                 IoCResource.Scope scope)
Retrieve an object from IoCContainer

Parameters:
clazz - object class
scope - scope to search for the instance
Returns:
object instance

get

public <T> T get(Class<T> clazz,
                 IoCResource.Scope scope,
                 String subscope)
Retrieve an object from IoCContainer

Parameters:
clazz - object class
scope - scope to search for the instance
subscope - subscope to search for the instance
Returns:
object instance

getBoundCruxViewId

public String getBoundCruxViewId()
Specified by:
getBoundCruxViewId in interface ViewAware

getBoundCruxView

public View getBoundCruxView()
Specified by:
getBoundCruxView in interface ViewAware

_getScope

protected org.cruxframework.crux.core.client.ioc.IocScope _getScope(IoCResource.Scope scope)
Retrieve the scope controller for the requested scope

Parameters:
scope -
Returns:


Copyright © 2014. All rights reserved.