jclouds/jclouds — pull request #1147 by adriancole (2013-01-07 08:05:10+00:00)
Title: Functional reflection

The cleans up a fair amount of proxy code, switching to a functional approach as below. This was put together with intent to have sensible Exception propagation, toString, hashCode features.

```
final Function test = new Function() {
public Result apply(Invocation e) {
return Result.success("foo");
}

public String toString() {
return "bar";
}
};
Closeable closeable = FunctionalReflection.newProxy(Closeable.class, test);
```

when this is merged, the following also needs to be: cc @nacx

https://github.com/jclouds/jclouds-chef/tree/functional-reflection

Note that the overall refactoring and cleanup is progressed, but not complete. SyncProxy is still very complex, and needs an overhaul, as do pieces of other internal classes. Also, now that classes named "Proxy" are no longer proxies, rather functions, we can rename them accordingly.