Class BeanUtilities


  • public class BeanUtilities
    extends Object
    Utility methods for testing BeanAttributes and Beans.
    Author:
    Jozef Hartinger
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void verifyQualifiers​(javax.enterprise.inject.spi.BeanAttributes<?> attributes, Annotation... expectedAnnotations)
      Verifies that the set of qualifiers of a given BeanAttributes matches the given set of qualifiers.
      static void verifyQualifierTypes​(Set<Annotation> annotations, Class<?>... expectedTypes)  
      static void verifyQualifierTypes​(javax.enterprise.inject.spi.BeanAttributes<?> attributes, Class<?>... expectedTypes)
      Verifies that the set of qualifiers of a given BeanAttributes matches the given set of annotation types.
      static void verifyStereotypes​(javax.enterprise.inject.spi.BeanAttributes<?> attributes, Class<?>... expected)
      Verifies that the set of stereotypes of a given BeanAttributes matches the expected stereotypes.
      static void verifyTypes​(javax.enterprise.inject.spi.BeanAttributes<?> attributes, Type... expectedTypes)
      Verifies that the set of bean types of a given BeanAttributes matches the expected types.
    • Method Detail

      • verifyTypes

        public static void verifyTypes​(javax.enterprise.inject.spi.BeanAttributes<?> attributes,
                                       Type... expectedTypes)
        Verifies that the set of bean types of a given BeanAttributes matches the expected types.
      • verifyStereotypes

        public static void verifyStereotypes​(javax.enterprise.inject.spi.BeanAttributes<?> attributes,
                                             Class<?>... expected)
        Verifies that the set of stereotypes of a given BeanAttributes matches the expected stereotypes.
      • verifyQualifierTypes

        public static void verifyQualifierTypes​(javax.enterprise.inject.spi.BeanAttributes<?> attributes,
                                                Class<?>... expectedTypes)
        Verifies that the set of qualifiers of a given BeanAttributes matches the given set of annotation types.
      • verifyQualifierTypes

        public static void verifyQualifierTypes​(Set<Annotation> annotations,
                                                Class<?>... expectedTypes)
      • verifyQualifiers

        public static void verifyQualifiers​(javax.enterprise.inject.spi.BeanAttributes<?> attributes,
                                            Annotation... expectedAnnotations)
        Verifies that the set of qualifiers of a given BeanAttributes matches the given set of qualifiers.