public class Delegating<T>
extends java.lang.Object
Such a proxy is used to mask the methods of an object, that are not part of a public interface. Or it is used to make an object compatible, e.g. when an object implements the methods of an interface, but does not implement the interface itself.
com.thoughtworks.proxy.toys.delegate| Modifier and Type | Class and Description |
|---|---|
static class |
Delegating.DelegatingBuild<T> |
static class |
Delegating.DelegatingModeOrBuild<T> |
static class |
Delegating.DelegatingWith<T> |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Object |
delegate |
private DelegationMode |
delegationMode |
private java.lang.Class<T> |
type |
| Modifier | Constructor and Description |
|---|---|
private |
Delegating(java.lang.Class<T> type) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Delegating.DelegatingWith<T> |
proxy(java.lang.Class<T> type)
Creates a factory for proxy instances that allow delegation.
|
private java.lang.Class<T> type
private java.lang.Object delegate
private DelegationMode delegationMode
private Delegating(java.lang.Class<T> type)
public static <T> Delegating.DelegatingWith<T> proxy(java.lang.Class<T> type)
type - the type of the proxy when it is finally created.