• 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: Static methods another Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Static methods another Question


  • Subject: Re: Static methods another Question
  • From: petite_abeille <email@hidden>
  • Date: Mon, 27 Oct 2003 11:47:33 +0100

On Oct 27, 2003, at 02:00, Bob Stuart wrote:

All the talk about KVC and Static brought to mind a problem I have been wondering about for a while. Objective C seemed much easier but we now love Java. I would like someone to tell me there is an easy way to provide code that performs like this. I hope to use this to embed a pageWithName in a static class.

Well... there are a couple devious ways to do that... but the bottom line is that Java doesn't have class methods... only static methods... and by "static", they mean what they say... sigh...


In any case, option 1 is to create an exception and get the class name from the StackTraceElement. Option 2 is to use SecurityManager.getClassContext()[1].

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: 
 >Re: KVC and static methods (From: Ray Ackland <email@hidden>)
 >Re: KVC and static methods (From: petite_abeille <email@hidden>)
 >Static methods another Question (From: Bob Stuart <email@hidden>)

  • Prev by Date: Filtering array returned by an EO's relationship (D2J)
  • Next by Date: Re: KVC and static methods
  • Previous by thread: Static methods another Question
  • Next by thread: Re: Static methods another Question
  • Index(es):
    • Date
    • Thread