Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SVN, XCode, and pre-existing code...



Michael Hall wrote:

Reflection itself isn't that bad. Very powerful and
about impossible to secure around if allowed, but not
really all that bad to work with and usually my
preferred way to handle cross-platform. Isolating the
platform specific to their own classes to limit how
much you have to do is not a bad idea though.

What is painfully tricky to do with reflection is the "implements ApplicationListener" part. Instantiating a class compiled normally that implements the interface is easy, but it requires a stub for ApplicationListener in order to compile on non-Macintosh platforms. Doing it without the stub requires heroics above and beyond the call of duty.


I seem to recall a posting on this list announcing code that did so using a dynamic proxy, avoiding the need to redistribute Apple's stubs. It might have been MRJ Adapter. However, having to distribute a 3rd party library isn't much different from having to distribute Apple's stubs.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden


This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.