public Collection < BeanRule > getBeanRules ( ) { Collection < BeanRule > idBasedBeanRules = beanRuleRegistry . getIdBasedBeanRules ( ) ; Collection < Set < BeanRule > > typeBasedBeanRules = beanRuleRegistry . getTypeBasedBeanRules ( ) ; Collection < BeanRule > configurableBeanRules = beanRuleRegistry . getConfigurableBeanRules ( ) ; int capacity = idBasedBeanRules . size ( ) ; for ( Set < BeanRule > brs : typeBasedBeanRules ) { capacity += brs . size ( ) ; } capacity += configurableBeanRules . size ( ) ; capacity = ( int ) ( capacity / 0.9f ) + 1 ; Set < BeanRule > beanRuleSet = new HashSet <> ( capacity , 0.9f ) ; beanRuleSet . addAll ( idBasedBeanRules ) ; for ( Set < BeanRule > brs : typeBasedBeanRules ) { beanRuleSet . addAll ( brs ) ; } beanRuleSet . addAll ( configurableBeanRules ) ; return beanRuleSet ; }
Returns all bean rules .