Package kboyle.oktane.core
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.
A container to be used by the
CommandHandler for accessing beans.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic BeanProvider.Emptyempty()<T> TGets a bean of the given type from the provider.static BeanProvider.Simplesimple()
-
Method Details
-
empty
- Returns:
- An empty provider.
-
simple
- Returns:
- A simple provider.
-
getBean
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.
-