Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,BeanData> |
instances |
Constructor and Description |
---|
SingletonScope(PetiteContainer pc) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Scope referenceScope)
Allows only singleton scoped beans to be injected into the target singleton bean.
|
java.lang.Object |
lookup(java.lang.String name)
Lookups for bean name.
|
void |
register(BeanDefinition beanDefinition,
java.lang.Object bean)
Registers the bean within the current scope.
|
void |
remove(java.lang.String name)
Removes the bean from the scope entirely.
|
void |
shutdown()
Iterate all beans and invokes registered destroy methods.
|
protected java.util.Map<java.lang.String,BeanData> instances
public SingletonScope(PetiteContainer pc)
public java.lang.Object lookup(java.lang.String name)
Scope
null
if bean is not
found or yet registered.public void register(BeanDefinition beanDefinition, java.lang.Object bean)
Scope
BeanDefinition
.
Also it may register destroy methods of a bean within this scope.public void remove(java.lang.String name)
Scope
public boolean accept(Scope referenceScope)
Copyright © 2003-present Jodd Team