Class BeanRule

    • Field Detail

      • CLASS_DIRECTIVE_PREFIX

        public static final java.lang.String CLASS_DIRECTIVE_PREFIX
        See Also:
        Constant Field Values
    • Constructor Detail

      • BeanRule

        public BeanRule()
    • 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: Replicable
        Creates and returns a new instance after replicating a rule or Object.
        Specified by:
        replicate in interface Replicable<BeanRule>
        Returns:
        replicated rule or new instance of Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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