org.mentawai.ioc
Class ScopeComponent

java.lang.Object
  extended by org.mentawai.ioc.DefaultComponent
      extended by org.mentawai.ioc.ScopeComponent
All Implemented Interfaces:
Bean

public class ScopeComponent
extends DefaultComponent

DefaultComponent with a scope attribute.

Author:
Sergio Oliveira

Constructor Summary
ScopeComponent(Class<? extends Object> klass, int scope)
          Creates a new ScopeComponent for the given class with the given scope.
ScopeComponent(Class<? extends Object> klass, List<Object> initValues, int scope)
          Creates a new ScopeComponent for the given class with the given init (constructor) values in the given scope.
ScopeComponent(Class<? extends Object> klass, List<Object> initValues, Map<String,Object> props, int scope)
          Creates a new ScopeComponent for the given class with the given property map and the given init (constructor) values in the given scope.
ScopeComponent(Class<? extends Object> klass, Map<String,Object> props, int scope)
          Creates a new ScopeComponent for the given class with the given property map in the given scope.
 
Method Summary
 int getScope()
           
 
Methods inherited from class org.mentawai.ioc.DefaultComponent
addInitValue, addInitValues, addProperties, addProperty, getBean, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScopeComponent

public ScopeComponent(Class<? extends Object> klass,
                      int scope)
Creates a new ScopeComponent for the given class with the given scope.

Parameters:
klass - The class used to create new instances.
scope - The scope.

ScopeComponent

public ScopeComponent(Class<? extends Object> klass,
                      List<Object> initValues,
                      int scope)
Creates a new ScopeComponent for the given class with the given init (constructor) values in the given scope. A constructor with the given init values will be called to instantiate the class.

Parameters:
klass - The class used to create new instances.
initValues - The values for the constructor.
scope - The scope

ScopeComponent

public ScopeComponent(Class<? extends Object> klass,
                      Map<String,Object> props,
                      int scope)
Creates a new ScopeComponent for the given class with the given property map in the given scope. The properties will be injected in the instance with reflection.

Parameters:
klass - The class used to create new instances.
props - The properties that need to be injected in each instance.
scope - The scope

ScopeComponent

public ScopeComponent(Class<? extends Object> klass,
                      List<Object> initValues,
                      Map<String,Object> props,
                      int scope)
Creates a new ScopeComponent for the given class with the given property map and the given init (constructor) values in the given scope. The properties will be injected in the instance with reflection. A constructor with the given init values will be called to instantiate the class.

Parameters:
klass - The class used to create new instances.
initValues - The values for the constructor.
props - The properties that need to be injected in each instance.
scope - The scope
Method Detail

getScope

public int getScope()


Copyright © 2013. All Rights Reserved.