Package com.aspectran.core.context.rule
Class BeanRule
- java.lang.Object
-
- com.aspectran.core.context.rule.BeanRule
-
- All Implemented Interfaces:
BeanReferenceable,Replicable<BeanRule>
public class BeanRule extends java.lang.Object implements Replicable<BeanRule>, BeanReferenceable
The Class BeanRule.Created: 2009. 03. 09 PM 23:48:09
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLASS_DIRECTIVE_PREFIX
-
Constructor Summary
Constructors Constructor Description BeanRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAutowireRule(AutowireRule autowireRule)voidaddConstructorArgumentItemRule(ItemRule constructorArgumentItemRule)Adds the constructor argument item rule.voidaddPropertyItemRule(ItemRule propertyItemRule)Adds the property item rule.java.util.List<AutowireRule>getAutowireRuleList()java.lang.Class<?>getBeanClass()Gets the bean class.BeanRefererTypegetBeanRefererType()Returns the Bean Referrer Type.java.lang.StringgetClassName()Gets the class type.ItemRuleMapgetConstructorArgumentItemRuleMap()Gets the constructor argument item rule map.AutowireRulegetConstructorAutowireRule()java.lang.StringgetDescription()Gets the description of this bean.java.lang.reflect.MethodgetDestroyMethod()Returns the destroy method.java.lang.StringgetDestroyMethodName()Returns the destroy method name.java.lang.Class<?>getFactoryBeanClass()Gets factory bean class.java.lang.StringgetFactoryBeanId()Gets the factory bean id.java.lang.reflect.MethodgetFactoryMethod()java.lang.StringgetFactoryMethodName()Gets the factory method name.ParameterBindingRule[]getFactoryMethodParameterBindingRules()FilterParametersgetFilterParameters()Gets the filter parameters.java.lang.StringgetId()Returns the bean id.java.lang.BooleangetImportant()Returns whether this bean is important.java.lang.reflect.MethodgetInitMethod()Returns the initialization method.java.lang.StringgetInitMethodName()Returns the initialization method name.ParameterBindingRule[]getInitMethodParameterBindingRules()java.lang.BooleangetLazyInit()Returns whether this bean is to be lazily initialized.java.lang.StringgetMaskPattern()Gets the mask pattern.ItemRuleMapgetPropertyItemRuleMap()Gets the property item rule map.java.lang.BooleangetProxied()java.lang.StringgetScanPattern()Gets the scan pattern.ScopeTypegetScopeType()Gets the scope type.java.lang.BooleangetSingleton()Returns whether this bean is a singleton.java.lang.Class<?>getTargetBeanClass()java.lang.StringgetTargetBeanClassName()booleanisConstructorAutowireParsed()booleanisDisposableBean()Returns whether this bean implements DisposableBean.booleanisFactoryable()Returns whether this bean can be proxied.booleanisFactoryBean()Returns whether this bean implements FactoryBean.booleanisFactoryOffered()booleanisFactoryProductionRequired()booleanisFieldAutowireParsed()booleanisImportant()Returns whether this bean is important.booleanisInitializableBean()Returns whether this bean implements InitializableBean.booleanisInitializableTransletBean()Returns whether this bean implements InitializableTransletBean.booleanisInnerBean()booleanisLazyInit()Returns whether this bean is to be lazily initialized.booleanisMethodAutowireParsed()booleanisProxied()Returns whether this bean is proxied.booleanisReplicated()Returns whether this bean has been replicated.booleanisSingleton()Returns whether this bean is a singleton.ItemRulenewConstructorArgumentItemRule()Adds a new constructor argument item rule and returns it.static BeanRulenewInnerBeanRule(java.lang.String className, java.lang.String initMethodName, java.lang.String destroyMethodName, java.lang.String factoryMethodName)static BeanRulenewInnerOfferedFactoryBeanRule(java.lang.String factoryBeanId, java.lang.String factoryMethodName, java.lang.String initMethodName, java.lang.String destroyMethodName)static BeanRulenewInstance(java.lang.String id, java.lang.String className, java.lang.String scanPattern, java.lang.String maskPattern, java.lang.String initMethodName, java.lang.String destroyMethodName, java.lang.String factoryMethodName, java.lang.String scope, java.lang.Boolean singleton, java.lang.Boolean lazyInit, java.lang.Boolean important)static BeanRulenewOfferedFactoryBeanInstance(java.lang.String id, java.lang.String factoryBeanId, java.lang.String factoryMethodName, java.lang.String initMethodName, java.lang.String destroyMethodName, java.lang.String scope, java.lang.Boolean singleton, java.lang.Boolean lazyInit, java.lang.Boolean important)ItemRulenewPropertyItemRule(java.lang.String propertyName)Adds a new property rule with the specified name and returns it.BeanRulereplicate()Creates and returns a new instance after replicating a rule or Object.static BeanRulereplicate(BeanRule beanRule)voidsetBeanClass(java.lang.Class<?> beanClass)Sets the bean class.voidsetClassName(java.lang.String className)Sets the class type.voidsetConstructorArgumentItemRuleMap(ItemRuleMap constructorArgumentItemRuleMap)Sets the constructor argument item rule map.voidsetConstructorAutowireParsed(boolean constructorAutowireParsed)voidsetConstructorAutowireRule(AutowireRule constructorAutowireRule)voidsetDescription(java.lang.String description)Sets the description of this bean.voidsetDestroyMethod(java.lang.reflect.Method destroyMethod)Sets the destroy method.voidsetDestroyMethodName(java.lang.String destroyMethodName)Sets the destroy method name.voidsetFactoryBeanClass(java.lang.Class<?> factoryBeanClass)Sets factory bean class.voidsetFactoryBeanId(java.lang.String factoryBeanId)Sets the factory bean id.voidsetFactoryMethod(java.lang.reflect.Method factoryMethod)voidsetFactoryMethodName(java.lang.String factoryMethodName)Sets the factory method name.voidsetFactoryMethodParameterBindingRules(ParameterBindingRule[] parameterBindingRules)voidsetFactoryOffered(boolean factoryOffered)voidsetFieldAutowireParsed(boolean fieldAutowireParsed)voidsetFilterParameters(FilterParameters filterParameters)Sets the filter parameters.voidsetId(java.lang.String id)Sets the bean id.voidsetImportant(java.lang.Boolean important)Sets whether this bean is important.voidsetInitMethod(java.lang.reflect.Method initMethod)Sets the initialization method.voidsetInitMethodName(java.lang.String initMethodName)Sets the initialization method name.voidsetInitMethodParameterBindingRules(ParameterBindingRule[] parameterBindingRules)voidsetInnerBean(boolean innerBean)voidsetLazyInit(java.lang.Boolean lazyInit)Sets whether this bean is to be lazily initialized.voidsetMaskPattern(java.lang.String maskPattern)Sets the mask pattern.voidsetMethodAutowireParsed(boolean methodAutowireParsed)voidsetPropertyItemRuleMap(ItemRuleMap propertyItemRuleMap)Sets the property item rule map.voidsetProxied(boolean proxied)Sets whether this bean is proxied.voidsetReplicated(boolean replicated)Sets whether this bean is replicated.voidsetScanPattern(java.lang.String scanPattern)Sets the scan pattern.voidsetScopeType(ScopeType scopeType)Sets the scope type.voidsetSingleton(java.lang.Boolean singleton)Sets whether this bean is a singleton.voidsetTargetBeanClass(java.lang.Class<?> targetBeanClass)java.lang.StringtoString()
-
-
-
Field Detail
-
CLASS_DIRECTIVE_PREFIX
public static final java.lang.String CLASS_DIRECTIVE_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public java.lang.String getId()
Returns the bean id.- Returns:
- the bean id
-
setId
public void setId(java.lang.String id)
Sets the bean id.- Parameters:
id- the bean id
-
getClassName
public java.lang.String getClassName()
Gets the class type.- Returns:
- the class type
-
setClassName
public void setClassName(java.lang.String className)
Sets the class type.- Parameters:
className- the new class name
-
getBeanClass
public java.lang.Class<?> getBeanClass()
Gets the bean class.- Returns:
- the bean class
-
setBeanClass
public void setBeanClass(java.lang.Class<?> beanClass)
Sets the bean class.- Parameters:
beanClass- the new bean class
-
getScanPattern
public java.lang.String getScanPattern()
Gets the scan pattern.- Returns:
- the scan pattern
-
setScanPattern
public void setScanPattern(java.lang.String scanPattern)
Sets the scan pattern.- Parameters:
scanPattern- the new scan pattern
-
getMaskPattern
public java.lang.String getMaskPattern()
Gets the mask pattern.- Returns:
- the mask pattern
-
getFilterParameters
public FilterParameters getFilterParameters()
Gets the filter parameters.- Returns:
- the filter parameters
-
setFilterParameters
public void setFilterParameters(FilterParameters filterParameters)
Sets the filter parameters.- Parameters:
filterParameters- the new filter parameters
-
setMaskPattern
public void setMaskPattern(java.lang.String maskPattern)
Sets the mask pattern.- Parameters:
maskPattern- the new mask pattern
-
getScopeType
public ScopeType getScopeType()
Gets the scope type.- Returns:
- the scope type
-
setScopeType
public void setScopeType(ScopeType scopeType)
Sets the scope type.- Parameters:
scopeType- the new scope type
-
getSingleton
public java.lang.Boolean getSingleton()
Returns whether this bean is a singleton.- Returns:
- whether this bean is a singleton
-
setSingleton
public void setSingleton(java.lang.Boolean singleton)
Sets whether this bean is a singleton.- Parameters:
singleton- whether this bean is a singleton
-
isSingleton
public boolean isSingleton()
Returns whether this bean is a singleton.- Returns:
- whether this bean is a singleton
-
getFactoryBeanId
public java.lang.String getFactoryBeanId()
Gets the factory bean id.- Returns:
- the factory bean id
-
setFactoryBeanId
public void setFactoryBeanId(java.lang.String factoryBeanId)
Sets the factory bean id.- Parameters:
factoryBeanId- the new factory bean id
-
getFactoryBeanClass
public java.lang.Class<?> getFactoryBeanClass()
Gets factory bean class.- Returns:
- the factory bean class
-
setFactoryBeanClass
public void setFactoryBeanClass(java.lang.Class<?> factoryBeanClass)
Sets factory bean class.- Parameters:
factoryBeanClass- the factory bean class
-
getFactoryMethodName
public java.lang.String getFactoryMethodName()
Gets the factory method name.- Returns:
- the factory method
-
setFactoryMethodName
public void setFactoryMethodName(java.lang.String factoryMethodName)
Sets the factory method name.- Parameters:
factoryMethodName- the new factory method name
-
getFactoryMethod
public java.lang.reflect.Method getFactoryMethod()
-
setFactoryMethod
public void setFactoryMethod(java.lang.reflect.Method factoryMethod)
-
getFactoryMethodParameterBindingRules
public ParameterBindingRule[] getFactoryMethodParameterBindingRules()
-
setFactoryMethodParameterBindingRules
public void setFactoryMethodParameterBindingRules(ParameterBindingRule[] parameterBindingRules)
-
isFactoryOffered
public boolean isFactoryOffered()
-
setFactoryOffered
public void setFactoryOffered(boolean factoryOffered)
-
isFactoryProductionRequired
public boolean isFactoryProductionRequired()
-
getTargetBeanClass
public java.lang.Class<?> getTargetBeanClass()
-
setTargetBeanClass
public void setTargetBeanClass(java.lang.Class<?> targetBeanClass)
-
getTargetBeanClassName
public java.lang.String getTargetBeanClassName()
-
getInitMethodName
public java.lang.String getInitMethodName()
Returns the initialization method name.- Returns:
- the initialization method name
-
setInitMethodName
public void setInitMethodName(java.lang.String initMethodName)
Sets the initialization method name.- Parameters:
initMethodName- the new initialization method name
-
getInitMethod
public java.lang.reflect.Method getInitMethod()
Returns the initialization method.- Returns:
- the initialization method
-
setInitMethod
public void setInitMethod(java.lang.reflect.Method initMethod)
Sets the initialization method.- Parameters:
initMethod- the initialization method
-
getInitMethodParameterBindingRules
public ParameterBindingRule[] getInitMethodParameterBindingRules()
-
setInitMethodParameterBindingRules
public void setInitMethodParameterBindingRules(ParameterBindingRule[] parameterBindingRules)
-
getDestroyMethodName
public java.lang.String getDestroyMethodName()
Returns the destroy method name.- Returns:
- the destroy method name
-
setDestroyMethodName
public void setDestroyMethodName(java.lang.String destroyMethodName)
Sets the destroy method name.- Parameters:
destroyMethodName- the new destroy method name
-
getDestroyMethod
public java.lang.reflect.Method getDestroyMethod()
Returns the destroy method.- Returns:
- the destroy method
-
setDestroyMethod
public void setDestroyMethod(java.lang.reflect.Method destroyMethod)
Sets the destroy method.- Parameters:
destroyMethod- the new destroy method
-
getLazyInit
public java.lang.Boolean getLazyInit()
Returns whether this bean is to be lazily initialized.- Returns:
- true, if this bean is to be lazily initialized
-
setLazyInit
public void setLazyInit(java.lang.Boolean lazyInit)
Sets whether this bean is to be lazily initialized.- Parameters:
lazyInit- whether this bean is to be lazily initialized
-
isLazyInit
public boolean isLazyInit()
Returns whether this bean is to be lazily initialized.- Returns:
- true, if this bean is to be lazily initialized
-
getImportant
public java.lang.Boolean getImportant()
Returns whether this bean is important.- Returns:
- whether this bean is important
-
setImportant
public void setImportant(java.lang.Boolean important)
Sets whether this bean is important. If specified as an important bean, it can not be overridden by another bean rule with the same name.- Parameters:
important- whether important bean
-
isImportant
public boolean isImportant()
Returns whether this bean is important.- Returns:
- whether this bean is important
-
getConstructorArgumentItemRuleMap
public ItemRuleMap getConstructorArgumentItemRuleMap()
Gets the constructor argument item rule map.- Returns:
- the constructor argument item rule map
-
setConstructorArgumentItemRuleMap
public void setConstructorArgumentItemRuleMap(ItemRuleMap constructorArgumentItemRuleMap)
Sets the constructor argument item rule map.- Parameters:
constructorArgumentItemRuleMap- the new constructor argument item rule map
-
newConstructorArgumentItemRule
public ItemRule newConstructorArgumentItemRule()
Adds a new constructor argument item rule and returns it.- Returns:
- the constructor argument item rule
-
addConstructorArgumentItemRule
public void addConstructorArgumentItemRule(ItemRule constructorArgumentItemRule)
Adds the constructor argument item rule.- Parameters:
constructorArgumentItemRule- the constructor argument item rule
-
getPropertyItemRuleMap
public ItemRuleMap getPropertyItemRuleMap()
Gets the property item rule map.- Returns:
- the property item rule map
-
setPropertyItemRuleMap
public void setPropertyItemRuleMap(ItemRuleMap propertyItemRuleMap)
Sets the property item rule map.- Parameters:
propertyItemRuleMap- the new property item rule map
-
newPropertyItemRule
public ItemRule newPropertyItemRule(java.lang.String propertyName)
Adds a new property rule with the specified name and returns it.- Parameters:
propertyName- the property name- Returns:
- the property item rule
-
addPropertyItemRule
public void addPropertyItemRule(ItemRule propertyItemRule)
Adds the property item rule.- Parameters:
propertyItemRule- the new property item rule
-
isFactoryBean
public boolean isFactoryBean()
Returns whether this bean implements FactoryBean.- Returns:
- the boolean
-
isDisposableBean
public boolean isDisposableBean()
Returns whether this bean implements DisposableBean.- Returns:
- the boolean
-
isInitializableBean
public boolean isInitializableBean()
Returns whether this bean implements InitializableBean.- Returns:
- the boolean
-
isInitializableTransletBean
public boolean isInitializableTransletBean()
Returns whether this bean implements InitializableTransletBean.- Returns:
- the boolean
-
isInnerBean
public boolean isInnerBean()
-
setInnerBean
public void setInnerBean(boolean innerBean)
-
isReplicated
public boolean isReplicated()
Returns whether this bean has been replicated.- Returns:
- true if this bean has been replicated; false otherwise
-
setReplicated
public void setReplicated(boolean replicated)
Sets whether this bean is replicated.- Parameters:
replicated- true, if this bean is replicated
-
isProxied
public boolean isProxied()
Returns whether this bean is proxied.- Returns:
- true if this bean is proxied; false otherwise
-
getProxied
public java.lang.Boolean getProxied()
-
setProxied
public void setProxied(boolean proxied)
Sets whether this bean is proxied.- Parameters:
proxied- true, if this bean is proxied
-
isFactoryable
public boolean isFactoryable()
Returns whether this bean can be proxied.- Returns:
- true if this bean can be proxied; false otherwise
-
getAutowireRuleList
public java.util.List<AutowireRule> getAutowireRuleList()
-
addAutowireRule
public void addAutowireRule(AutowireRule autowireRule)
-
getConstructorAutowireRule
public AutowireRule getConstructorAutowireRule()
-
setConstructorAutowireRule
public void setConstructorAutowireRule(AutowireRule constructorAutowireRule)
-
isConstructorAutowireParsed
public boolean isConstructorAutowireParsed()
-
setConstructorAutowireParsed
public void setConstructorAutowireParsed(boolean constructorAutowireParsed)
-
isFieldAutowireParsed
public boolean isFieldAutowireParsed()
-
setFieldAutowireParsed
public void setFieldAutowireParsed(boolean fieldAutowireParsed)
-
isMethodAutowireParsed
public boolean isMethodAutowireParsed()
-
setMethodAutowireParsed
public void setMethodAutowireParsed(boolean methodAutowireParsed)
-
getDescription
public java.lang.String getDescription()
Gets the description of this bean.- Returns:
- the description
-
setDescription
public void setDescription(java.lang.String description)
Sets the description of this bean.- Parameters:
description- the new description
-
replicate
public BeanRule replicate()
Description copied from interface:ReplicableCreates and returns a new instance after replicating a rule or Object.- Specified by:
replicatein interfaceReplicable<BeanRule>- Returns:
- replicated rule or new instance of Object
-
getBeanRefererType
public BeanRefererType getBeanRefererType()
Description copied from interface:BeanReferenceableReturns the Bean Referrer Type.- Specified by:
getBeanRefererTypein interfaceBeanReferenceable- Returns:
- the Bean Referrer Type
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
newInstance
public static BeanRule newInstance(java.lang.String id, java.lang.String className, java.lang.String scanPattern, java.lang.String maskPattern, java.lang.String initMethodName, java.lang.String destroyMethodName, java.lang.String factoryMethodName, java.lang.String scope, java.lang.Boolean singleton, java.lang.Boolean lazyInit, java.lang.Boolean important) throws IllegalRuleException
- Throws:
IllegalRuleException
-
newOfferedFactoryBeanInstance
public static BeanRule newOfferedFactoryBeanInstance(java.lang.String id, java.lang.String factoryBeanId, java.lang.String factoryMethodName, java.lang.String initMethodName, java.lang.String destroyMethodName, java.lang.String scope, java.lang.Boolean singleton, java.lang.Boolean lazyInit, java.lang.Boolean important) throws IllegalRuleException
- Throws:
IllegalRuleException
-
newInnerBeanRule
public static BeanRule newInnerBeanRule(java.lang.String className, java.lang.String initMethodName, java.lang.String destroyMethodName, java.lang.String factoryMethodName) throws IllegalRuleException
- Throws:
IllegalRuleException
-
newInnerOfferedFactoryBeanRule
public static BeanRule newInnerOfferedFactoryBeanRule(java.lang.String factoryBeanId, java.lang.String factoryMethodName, java.lang.String initMethodName, java.lang.String destroyMethodName) throws IllegalRuleException
- Throws:
IllegalRuleException
-
-