• 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: Ricardo Strausz <email@hidden>
  • Date: Tue, 28 Oct 2003 12:29:12 -0600

did you try object.getClass().toString();

On domingo, octu 26, 2003, at 19:00 America/Mexico_City, Bob Stuart wrote:

Hi All,
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.



Class A public static String myClassName(){ //Magic function that somehow knows what class it is. return ???? }


Class B extends A { }


Class C

	system.out.println(A.myClassName());
	system.out.println(B.myClassName());


I would like to see output like
A
B
--
Bob Stuart
_______________________________________________
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.
_______________________________________________
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: 
 >Static methods another Question (From: Bob Stuart <email@hidden>)

  • Prev by Date: Re: Re(2): Panther & WO 5.1.4?
  • Next by Date: Re: Filtering array returned by an EO's relationship (D2J)
  • Previous by thread: Re: Static methods another Question
  • Next by thread: Filtering array returned by an EO's relationship (D2J)
  • Index(es):
    • Date
    • Thread