• 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: java Bridge and non new initializer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java Bridge and non new initializer


  • Subject: Re: java Bridge and non new initializer
  • From: Andreas Monitzer <email@hidden>
  • Date: Wed, 6 Aug 2003 00:23:47 +0200

On Tuesday, Aug 5, 2003, at 04:33 Europe/Vienna, Lance Pysher wrote:

I have found a java library I would like to access form cocoa. Unfortunately all the the concrete classes are private and can only be access through the abstract classes, which have an unusual way of creating new instances. Instead of foo myFoo = new foo() it is foo myFoo = foo.getInstance() which then accesses the concrete classes normal constructor. Is there a way to bypass this constrain in cocoa or I need to create a custom version of the library. I have tried to write a java class to use the getInstance method, but that still does not work. Any suggestions?

id instance=[NSClassFromString(@"foo") getInstance];

should work fine (at least it did the last time I used it).

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

References: 
 >java Bridge and non new initializer (From: Lance Pysher <email@hidden>)

  • Prev by Date: NSbrowser-ComputerSingleTypeDisplay
  • Next by Date: Re: Panther discussions..
  • Previous by thread: java Bridge and non new initializer
  • Next by thread: Re: BOM and UTF-8 (was Re: Question about line breaks and file types)
  • Index(es):
    • Date
    • Thread