Interface BeanIntrospector

    • Method Detail

      • forClassLoader

        static BeanIntrospector forClassLoader​(java.lang.ClassLoader classLoader)
        Creates a new default bean introspector that uses the given classloader.
        Parameters:
        classLoader - The class loader to load introspections
        Returns:
        A new bean introspector
        Since:
        3.0.1
      • findIntrospectedTypes

        @NonNull
        java.util.Collection<java.lang.Class<?>> findIntrospectedTypes​(@NonNull
                                                                       java.util.function.Predicate<? super BeanIntrospectionReference<?>> filter)
        Finds introspections with the given filter.
        Parameters:
        filter - A filter that receives a BeanIntrospectionReference
        Returns:
        A collection of introspections
        Since:
        3.0
      • findIntrospection

        @NonNull
        <T> java.util.Optional<BeanIntrospection<T>> findIntrospection​(@NonNull
                                                                       java.lang.Class<T> beanType)
        Find a BeanIntrospection for the given bean type.
        Type Parameters:
        T - The bean generic type
        Parameters:
        beanType - The bean type
        Returns:
        An optional introspection
      • findIntrospections

        @NonNull
        default java.util.Collection<BeanIntrospection<java.lang.Object>> findIntrospections​(@NonNull
                                                                                             java.lang.Class<? extends java.lang.annotation.Annotation> stereotype)
        Finds introspections for classes annotated with the given stereotype.
        Parameters:
        stereotype - The stereotype
        Returns:
        The introspections
      • findIntrospections

        @NonNull
        default java.util.Collection<BeanIntrospection<java.lang.Object>> findIntrospections​(@NonNull
                                                                                             java.lang.Class<? extends java.lang.annotation.Annotation> stereotype,
                                                                                             @NonNull
                                                                                             java.lang.String... packageNames)
        Finds introspections for classes annotated with the given stereotype.
        Parameters:
        stereotype - The stereotype
        packageNames - The package names to include in the search
        Returns:
        The introspections
      • getIntrospection

        @NonNull
        default <T> BeanIntrospection<T> getIntrospection​(@NonNull
                                                          java.lang.Class<T> beanType)
        Retrieves an introspection for the given type.
        Type Parameters:
        T - The bean generic type
        Parameters:
        beanType - The bean type
        Returns:
        The introspection
        Throws:
        IntrospectionException - If no introspection data is found and the bean is not annotated with Introspected