Working with JavaMethods doesn't work.
--------------------------------------

                 Key: JRUBY-1976
                 URL: http://jira.codehaus.org/browse/JRUBY-1976
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
            Reporter: Ola Bini
            Assignee: Bill Dortch


I'm trying to do some reflection work, and those parts _really_ doesn't work. 
Say I have a method called doSomething, on a class org.FooBar. That fails with 
this code:

{noformat}
require 'java'

method = org.FooBar.java_class.java_method("doSomething")
mods = java.lang.reflect.Method.java_class.declared_field("modifiers")
mods.accessible = true
mods.set_value(method, mods.value(method) & ~java.lang.reflect.Modifier::FINAL)
{noformat}

It fails since the method object doesn't seem to be unwrapped to the "real" 
Java object when sent as argument. That makes the reflection API's near nigh 
impossible to use from JRuby.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to