Re: access to java class objects

You’re right.

What about this?:

cls = javax.swing.JLabel
cls.new.getClass
=> #Java::JavaLang::Class:0x1791f022

cls.new.getClass.get_package
=> #Java::JavaLang::Package:0x2bf87baf

But I suppose you won’t like the call to new ?!

Cheers
Michael J.

On Mi 17/03/10 13:22 , Jan H. [email protected] wrote:

This looks good, but does somehow not return the java object for

irb(main):012:0> cls = javax.swing.JLabel
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email

---- Msg sent via @Mail - http://atmail.com/


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi,

Am 17.03.2010 um 13:36 schrieb Michael J.:

You’re right.

What about this?:

cls = javax.swing.JLabel
cls.new.getClass
=> #Java::JavaLang::Class:0x1791f022

cls.new.getClass.get_package
=> #Java::JavaLang::Package:0x2bf87baf

and what do you do if the class does not have a constructor without
args?

j


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs