question: public static < T > T implement ( Class < T > type , Object object ) { if ( type . isInstance ( object ) ) { return type . cast ( object ) ; } return type . cast ( Proxy . newProxyInstance ( type . getClassLoader ( ) , new Class [ ] { type } , new DuckType ( object ) ) ) ; }
target:  Causes object to implement the interfaceToImplement and returns an instance of the object implementing interfaceToImplement even if interfaceToImplement was not declared in object.getClass()'s implements declaration. <p/> This works as long as all methods declared in interfaceToImplement are present on object.