T
- the type of component being switched betweenpublic class SwitchingInvocationHandler<T> extends Object implements InvocationHandler
InvocationHandler
that switches between two delegates (an "enabled" one and
a "disabled" one), based on the return value of InvocationSwitcher.isEnabled()
.Constructor and Description |
---|
SwitchingInvocationHandler(T enabled,
T disabled,
InvocationSwitcher invocationSwitcher)
Constructor.
|
public SwitchingInvocationHandler(T enabled, T disabled, InvocationSwitcher invocationSwitcher)
enabled
- the delegate to use when the invocation switcher returns "enabled"disabled
- the delegate to use when the invocation switcher returns "disabled"invocationSwitcher
- the invocation switcher to useCopyright © 2002-2021 Atlassian. All Rights Reserved.