Package org.apereo.cas.util.spring.beans
Class BeanSupplier.DefaultBeanSupplier<T>
- java.lang.Object
-
- org.apereo.cas.util.spring.beans.BeanSupplier.DefaultBeanSupplier<T>
-
- All Implemented Interfaces:
java.util.function.Supplier<T>,BeanSupplier<T>
- Enclosing interface:
- BeanSupplier<T>
public static class BeanSupplier.DefaultBeanSupplier<T> extends java.lang.Object implements BeanSupplier<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apereo.cas.util.spring.beans.BeanSupplier
BeanSupplier.DefaultBeanSupplier<T>, BeanSupplier.ProxiedBeanSupplier<T>
-
-
Field Summary
-
Fields inherited from interface org.apereo.cas.util.spring.beans.BeanSupplier
PROXY_BEAN_TOSTRING_PREFIX
-
-
Constructor Summary
Constructors Constructor Description DefaultBeanSupplier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BeanSupplier<T>alwaysMatch()Always true condition.Tget()BeanSupplier<T>otherwise(java.util.function.Supplier<T> beanSupplier)Create the proxy bean via a given supplier when the condition fails.BeanSupplier<T>otherwiseProxy()Create the proxy bean via a given supplier when the condition fails.BeanSupplier<T>supply(java.util.function.Supplier<T> beanSupplier)Create the bean via a given supplier when condition passes.BeanSupplier<T>when(java.util.function.Supplier<java.lang.Boolean> conditionSupplier)Specify condition for bean supplier to create beans.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apereo.cas.util.spring.beans.BeanSupplier
and, ifExists, neverMatch, when
-
-
-
-
Method Detail
-
get
public T get()
- Specified by:
getin interfaceBeanSupplier<T>- Specified by:
getin interfacejava.util.function.Supplier<T>
-
alwaysMatch
public BeanSupplier<T> alwaysMatch()
Description copied from interface:BeanSupplierAlways true condition.- Specified by:
alwaysMatchin interfaceBeanSupplier<T>- Returns:
- the bean supplier
-
when
@CanIgnoreReturnValue public BeanSupplier<T> when(java.util.function.Supplier<java.lang.Boolean> conditionSupplier)
Description copied from interface:BeanSupplierSpecify condition for bean supplier to create beans.- Specified by:
whenin interfaceBeanSupplier<T>- Parameters:
conditionSupplier- the condition supplier- Returns:
- the bean supplier
-
supply
@CanIgnoreReturnValue public BeanSupplier<T> supply(java.util.function.Supplier<T> beanSupplier)
Description copied from interface:BeanSupplierCreate the bean via a given supplier when condition passes.- Specified by:
supplyin interfaceBeanSupplier<T>- Parameters:
beanSupplier- the bean supplier- Returns:
- the bean supplier
-
otherwise
@CanIgnoreReturnValue public BeanSupplier<T> otherwise(java.util.function.Supplier<T> beanSupplier)
Description copied from interface:BeanSupplierCreate the proxy bean via a given supplier when the condition fails.- Specified by:
otherwisein interfaceBeanSupplier<T>- Parameters:
beanSupplier- the bean supplier- Returns:
- the bean supplier
-
otherwiseProxy
@CanIgnoreReturnValue public BeanSupplier<T> otherwiseProxy()
Description copied from interface:BeanSupplierCreate the proxy bean via a given supplier when the condition fails.- Specified by:
otherwiseProxyin interfaceBeanSupplier<T>- Returns:
- the bean supplier
-
-