Package ch.tocco.nice2.boot.api.bean
Class BeanUtils
java.lang.Object
ch.tocco.nice2.boot.api.bean.BeanUtils
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V, A extends Annotation>
Map<K, V> createBeanMap
(org.springframework.context.ApplicationContext applicationContext, Class<A> annotationClass, Class<V> beanClass, Function<A, K[]> keyFunction) static <T,
A extends Annotation, B>
List<T> createContributionList
(org.springframework.context.ApplicationContext applicationContext, Class<A> annotationClass, Class<B> beanClass, Class<T> contributionClass, BiFunction<A, BeanUtils.BeanInfo<B>, T> mapperFunction) static <V,
A extends Annotation>
Stream<V> findAnnotatedBeans
(org.springframework.context.ApplicationContext applicationContext, Class<A> annotationClass, Class<V> beanClass) static <A extends Annotation>
AfindAnnotation
(Class<A> annotationClass, Object bean)
-
Method Details
-
createContributionList
public static <T,A extends Annotation, List<T> createContributionListB> (org.springframework.context.ApplicationContext applicationContext, Class<A> annotationClass, Class<B> beanClass, Class<T> contributionClass, BiFunction<A, BeanUtils.BeanInfo<B>, T> mapperFunction) -
createBeanMap
public static <K,V, Map<K,A extends Annotation> V> createBeanMap(org.springframework.context.ApplicationContext applicationContext, Class<A> annotationClass, Class<V> beanClass, Function<A, K[]> keyFunction) -
findAnnotatedBeans
public static <V,A extends Annotation> Stream<V> findAnnotatedBeans(org.springframework.context.ApplicationContext applicationContext, Class<A> annotationClass, Class<V> beanClass) -
findAnnotation
-