Interface BeanInformationRepository

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.String> beanNameFor​(java.lang.Object bean)
      Retrieves the (cached) bean name (as used in the application context) for the given bean.
      java.util.Optional<java.lang.reflect.Method> factoryMethodFor​(java.lang.Object bean)
      Retrieves the (cached) factory method of the given bean if available.
      OngoingAnnotationExtraction from​(java.lang.Object bean)
      Starting point of a fluent clause to find annotations of a given type from the bean.
    • Method Detail

      • beanNameFor

        java.util.Optional<java.lang.String> beanNameFor​(java.lang.Object bean)
        Retrieves the (cached) bean name (as used in the application context) for the given bean.
        Parameters:
        bean - the bean for which to get the name
        Returns:
        the name of the bean if known
      • factoryMethodFor

        java.util.Optional<java.lang.reflect.Method> factoryMethodFor​(java.lang.Object bean)
        Retrieves the (cached) factory method of the given bean if available.
        Parameters:
        bean - the bean for which to retrieve the factory method.
        Returns:
        the factory method of the bean (if it has one)
      • from

        OngoingAnnotationExtraction from​(java.lang.Object bean)
        Starting point of a fluent clause to find annotations of a given type from the bean. The full syntax is like this:
              Optional<AnAnnotation> annotation = from(aBean).getAnnotation(AnAnnotation.class);
         
        Details on the strategy to find the annotations, see OngoingAnnotationExtraction.
        Parameters:
        bean - the bean on which to find annotations
        Returns:
        an object to specify the annotations to find
        See Also:
        OngoingAnnotationExtraction