Interface BeanProvider

All Known Implementing Classes:
BeanProvider.Empty, BeanProvider.Simple
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface BeanProvider
A container to be used by the CommandHandler for accessing beans.
  • Method Details

    • empty

      static BeanProvider.Empty empty()
      Returns:
      An empty provider.
    • simple

      static BeanProvider.Simple simple()
      Returns:
      A simple provider.
    • getBean

      <T> T getBean(Class<T> cl)
      Gets a bean of the given type from the provider.
      Type Parameters:
      T - The type you want.
      Parameters:
      cl - The class of the type you want to fetch.
      Returns:
      The bean corresponding to the given type.