public class HotSwapping<T>
extends java.lang.Object
Swappable, that is used for the hot swap operation.com.thoughtworks.proxy.toys.hotswap| Modifier and Type | Class and Description |
|---|---|
static class |
HotSwapping.HotSwappingBuild<T> |
static class |
HotSwapping.HotSwappingBuildOrMode<T> |
static class |
HotSwapping.HotSwappingWith<T> |
| Modifier and Type | Field and Description |
|---|---|
private DelegationMode |
delegationMode |
private java.lang.Object |
instance |
private java.lang.Class<?>[] |
types |
| Modifier | Constructor and Description |
|---|---|
private |
HotSwapping(java.lang.Class<T> primaryType,
java.lang.Class<?>... types) |
| Modifier and Type | Method and Description |
|---|---|
private T |
build(ProxyFactory factory)
Create a proxy with hot swapping capabilities for specific types of the delegate given with an
ObjectReference. |
static <T> HotSwapping.HotSwappingWith<T> |
proxy(java.lang.Class<T> type)
Creates a factory for proxy instances that allow the exchange of delegated instances.
|
static <T> HotSwapping.HotSwappingWith<T> |
proxy(java.lang.Class<T> primaryType,
java.lang.Class<?>... types)
Creates a factory for proxy instances that allow the exchange of delegated instances.
|
private java.lang.Object instance
private java.lang.Class<?>[] types
private DelegationMode delegationMode
private HotSwapping(java.lang.Class<T> primaryType, java.lang.Class<?>... types)
public static <T> HotSwapping.HotSwappingWith<T> proxy(java.lang.Class<T> type)
type - the type of the proxy when it is finally created.public static <T> HotSwapping.HotSwappingWith<T> proxy(java.lang.Class<T> primaryType, java.lang.Class<?>... types)
primaryType - the primary type implemented by the proxytypes - other types that are implemented by the proxyprivate T build(ProxyFactory factory)
ObjectReference. The delegate must implement the given types, if the invoker is in static typing mode,
otherwise it must only have signature compatible methods. Proxies created by this method will implement
Swappablefactory - the ProxyFactory to use.Swappable