|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.petite.PetiteBeans
public abstract class PetiteBeans
Base layer of Petite Container.
Holds beans and scopes definitions.
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.Class,java.lang.String[]> |
beanCollections
Map of all bean collections. |
protected java.util.Map<java.lang.String,BeanDefinition> |
beans
Map of all beans definitions. |
protected InjectionPointFactory |
injectionPointFactory
Injection point factory. |
protected PetiteConfig |
petiteConfig
Petite configuration. |
protected PetiteResolvers |
petiteResolvers
Petite resolvers. |
protected java.util.Map<java.lang.Class<? extends Scope>,Scope> |
scopes
Map of all bean scopes. |
| Constructor Summary | |
|---|---|
protected |
PetiteBeans(PetiteConfig petiteConfig)
|
| Method Summary | |
|---|---|
java.util.Iterator<BeanDefinition> |
beansIterator()
Returns iterator over all registered beans. |
void |
defineParameter(java.lang.String name,
java.lang.Object value)
Defines new parameter. |
protected void |
definePetiteBean(java.lang.String name,
java.lang.Class type,
java.lang.Class<? extends Scope> scopeType,
WiringMode wiringMode)
Single point of bean definition. |
PetiteConfig |
getConfig()
Returns Petite configuration. |
java.lang.Object |
getParameter(java.lang.String name)
Returns defined parameter. |
PetiteResolvers |
getResolvers()
Returns Petite resolvers. |
int |
getTotalBeans()
Returns total number of registered beans. |
int |
getTotalScopes()
Returns total number of used scopes. |
boolean |
isBeanNameRegistered(java.lang.String name)
Returns true if bean name is registered. |
protected BeanDefinition |
lookupBeanDefinition(java.lang.String name)
Lookups for bean definition. |
protected BeanDefinition |
lookupBeanDefinition(java.lang.String[] names)
Lookups for first founded bean definition. |
protected BeanDefinition |
lookupExistingBeanDefinition(java.lang.String name)
Lookups for existing bean. |
protected BeanDefinition |
registerPetiteBean(java.lang.String name,
java.lang.Class type,
java.lang.Class<? extends Scope> scopeType,
WiringMode wiringMode)
Single point of bean registration. |
protected void |
registerPetiteCtorInjectionPoint(java.lang.String beanName,
java.lang.Class[] paramTypes,
java.lang.String[] references)
Single point of constructor injection point registration. |
protected void |
registerPetiteInitMethods(java.lang.String beanName,
java.lang.String[] beforeMethodNames,
java.lang.String[] afterMethodNames)
Single point of init method registration. |
protected void |
registerPetiteMethodInjectionPoint(java.lang.String beanName,
java.lang.String methodName,
java.lang.Class[] arguments,
java.lang.String[] references)
Single point of method injection point registration. |
protected void |
registerPetitePropertyInjectionPoint(java.lang.String beanName,
java.lang.String property,
java.lang.String reference)
Single point of property injection point registration. |
protected void |
registerPetiteSetInjectionPoint(java.lang.String beanName,
java.lang.String property)
Single point of property injection point registration. |
void |
registerScope(java.lang.Class<? extends Scope> scopeType,
Scope scope)
Registers new scope. |
protected BeanDefinition |
removeBeanDefinition(java.lang.String name)
Removes bean and returns definition of removed bean. |
java.lang.String |
resolveBeanName(java.lang.Class type)
Resolves bean's name from bean annotation or type name. |
protected java.lang.String[] |
resolveBeanNamesForType(java.lang.Class type)
Resolve bean names for give type. |
protected java.lang.String[] |
resolveBeanParams(java.lang.String name,
boolean resolveReferenceParams)
Prepares list of all bean parameters and optionally resolves inner references. |
protected SetInjectionPoint[] |
resolveCollectionInjectionPoint(java.lang.Class type,
boolean autowire)
|
protected CtorInjectionPoint |
resolveCtorInjectionPoint(java.lang.Class type)
|
protected CtorInjectionPoint |
resolveDefaultCtorInjectionPoint(java.lang.Class type)
|
protected InitMethodPoint[] |
resolveInitMethods(java.lang.Object bean)
|
protected MethodInjectionPoint[] |
resolveMethodInjectionPoint(java.lang.Class type)
|
protected PropertyInjectionPoint[] |
resolvePropertyInjectionPoint(java.lang.Class type,
boolean autowire)
|
protected Scope |
resolveScope(java.lang.Class<? extends Scope> scopeType)
Resolves scope from scope type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.Map<java.lang.String,BeanDefinition> beans
protected final java.util.Map<java.lang.Class<? extends Scope>,Scope> scopes
protected final java.util.Map<java.lang.Class,java.lang.String[]> beanCollections
protected final PetiteConfig petiteConfig
Petite configuration.
protected final InjectionPointFactory injectionPointFactory
Injection point factory.
protected final PetiteResolvers petiteResolvers
Petite resolvers.
| Constructor Detail |
|---|
protected PetiteBeans(PetiteConfig petiteConfig)
| Method Detail |
|---|
public PetiteResolvers getResolvers()
public PetiteConfig getConfig()
Petite configuration.
All changes on config should be applied before
beans registration process starts.
protected Scope resolveScope(java.lang.Class<? extends Scope> scopeType)
public void registerScope(java.lang.Class<? extends Scope> scopeType,
Scope scope)
protected BeanDefinition lookupBeanDefinition(java.lang.String name)
bean definition.
Returns null if bean name doesn't exist.
protected BeanDefinition lookupBeanDefinition(java.lang.String[] names)
bean definition.
protected BeanDefinition lookupExistingBeanDefinition(java.lang.String name)
public boolean isBeanNameRegistered(java.lang.String name)
true if bean name is registered.
public java.lang.String resolveBeanName(java.lang.Class type)
protected BeanDefinition registerPetiteBean(java.lang.String name,
java.lang.Class type,
java.lang.Class<? extends Scope> scopeType,
WiringMode wiringMode)
protected void definePetiteBean(java.lang.String name,
java.lang.Class type,
java.lang.Class<? extends Scope> scopeType,
WiringMode wiringMode)
protected BeanDefinition removeBeanDefinition(java.lang.String name)
null.
protected java.lang.String[] resolveBeanNamesForType(java.lang.Class type)
protected void registerPetiteCtorInjectionPoint(java.lang.String beanName,
java.lang.Class[] paramTypes,
java.lang.String[] references)
protected void registerPetitePropertyInjectionPoint(java.lang.String beanName,
java.lang.String property,
java.lang.String reference)
protected void registerPetiteSetInjectionPoint(java.lang.String beanName,
java.lang.String property)
protected void registerPetiteMethodInjectionPoint(java.lang.String beanName,
java.lang.String methodName,
java.lang.Class[] arguments,
java.lang.String[] references)
protected void registerPetiteInitMethods(java.lang.String beanName,
java.lang.String[] beforeMethodNames,
java.lang.String[] afterMethodNames)
public int getTotalBeans()
public int getTotalScopes()
public java.util.Iterator<BeanDefinition> beansIterator()
protected CtorInjectionPoint resolveCtorInjectionPoint(java.lang.Class type)
protected CtorInjectionPoint resolveDefaultCtorInjectionPoint(java.lang.Class type)
protected PropertyInjectionPoint[] resolvePropertyInjectionPoint(java.lang.Class type,
boolean autowire)
protected SetInjectionPoint[] resolveCollectionInjectionPoint(java.lang.Class type,
boolean autowire)
protected MethodInjectionPoint[] resolveMethodInjectionPoint(java.lang.Class type)
protected InitMethodPoint[] resolveInitMethods(java.lang.Object bean)
public void defineParameter(java.lang.String name,
java.lang.Object value)
public java.lang.Object getParameter(java.lang.String name)
protected java.lang.String[] resolveBeanParams(java.lang.String name,
boolean resolveReferenceParams)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||