public class RelaxedDuckType extends DuckType implements java.lang.reflect.InvocationHandler
This version is the relaxed DuckType. If a method in the interface is not present on the underlying object, the proxy simply returns null.
DuckType.Wrapper
object, objectClass
Modifier | Constructor and Description |
---|---|
protected |
RelaxedDuckType(java.lang.Object object) |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
implement(java.lang.Class interfaceToImplement,
java.lang.Object object) |
static boolean |
includes(java.lang.Object object,
java.lang.String method,
java.lang.Class[] args) |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
equals, hashCode, instanceOf