• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hairy Java related question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hairy Java related question


  • Subject: Re: Hairy Java related question
  • From: petite_abeille <email@hidden>
  • Date: Fri, 24 Oct 2003 12:50:38 +0200

Hello,

On Friday, Oct 24, 2003, at 12:41 Europe/Amsterdam, Ray Ackland wrote:

The problem I have is the type checking of the compiler doesn't know about the mentioned static method, as I can't type it at this stage because I don't know what the class will be yet. How do I get around this?

Reflection? I would even venture that you could use KVC directly to get to your ends.


Just as I finish writing this, I start to think that using an interface may be the way. Any comments? Would that be the solution, and what do I need to do in the calling code to get it to type check against the interface?

Well, using a Java interface is usually a good idea, but you will need to have an object instance to get anywhere, not simply a class, as there is not such a thing as a static Java interface unfortunately... sigh...


Cheers,

PA.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Hairy Java related question (From: Ray Ackland <email@hidden>)

  • Prev by Date: Hairy Java related question
  • Next by Date: Extending NSKeyValueCoding?
  • Previous by thread: Hairy Java related question
  • Next by thread: Extending NSKeyValueCoding?
  • Index(es):
    • Date
    • Thread