Interface BeanIntrospector


public interface BeanIntrospector
Primary interface for obtaining BeanIntrospection instances that are computed at compilation time.
Since:
1.0
Author:
graemerocher
See Also:
  • Field Details

  • Method Details

    • forClassLoader

      static BeanIntrospector forClassLoader(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
    • findIntrospections

      @NonNull Collection<BeanIntrospection<Object>> findIntrospections(@NonNull Predicate<? super BeanIntrospectionReference<?>> filter)
      Finds introspections with the given filter.
      Parameters:
      filter - A filter that receives a BeanIntrospectionReference
      Returns:
      A collection of introspections
    • findIntrospectedTypes

      @NonNull Collection<Class<?>> findIntrospectedTypes(@NonNull 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

      <T> @NonNull Optional<BeanIntrospection<T>> findIntrospection(@NonNull 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

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

      default @NonNull Collection<BeanIntrospection<Object>> findIntrospections(@NonNull Class<? extends Annotation> stereotype, @NonNull 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

      default <T> @NonNull BeanIntrospection<T> getIntrospection(@NonNull 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