Class BeanMethods


  • public class BeanMethods
    extends Object
    • Method Detail

      • getPostConstructMethods

        public static <T> List<javax.enterprise.inject.spi.AnnotatedMethod<? super T>> getPostConstructMethods​(EnhancedAnnotatedType<T> type)
      • getPreDestroyMethods

        public static <T> List<javax.enterprise.inject.spi.AnnotatedMethod<? super T>> getPreDestroyMethods​(EnhancedAnnotatedType<T> type)
      • filterMethods

        public static <T> Collection<EnhancedAnnotatedMethod<?,​? super T>> filterMethods​(Collection<EnhancedAnnotatedMethod<?,​? super T>> methods)
        Oracle JDK 8 compiler (unlike prev versions) generates bridge methods which have method and parameter annotations copied from the original method. However such methods should not become observers, producers, disposers, initializers and lifecycle callbacks. Moreover, JDK8u60 propagates parameter annotations to the synthetic method generated for a lambda. Therefore, we should also ignore synthetic methods.
        Parameters:
        methods -
        Returns:
        a collection view with bridge and synthetic methods filtered out