public static <T extends NSObject> T wrap(ID id, Class<T> javaClass, boolean retain) {
// Why would we not want to retain? Well if we are wrapping a Core Foundation
// created object, or one created with new (alloc init), it will not
// have been autorelease'd.
NSObjectInvocationHandler invocationHandler = new NSObjectInvocationHandler(id, javaClass, retain);
return createProxy(javaClass, invocationHandler);
}