ruby - JRuby limitations when working with Java Classes -


As far as I understand JRuby, the Java class is possible in JRuby code and vice versa, however , I still do

  • Is it possible to use reflection from JRB on Java classes?
  • Is it possible to use reflection on Java on JRuby class?
  • Do I have executable classes in Djerobi?
  • Is it possible to redefine the Java class within the Jerobi script? (Just like I can redefine eg integer in C. Ruby)
  • Are there any other limitations that prevent JRB from being used as part of any Java application?
    • What jruby can work with java annotations?

    No Ruby has annotation. The compiler will allow you to add annotations, which are used when compiling a class file.

    • Is it possible to use reflection from JRB on Java class?

    Yes:

      java.util.Vector.methods.include? '[]' # = & Gt; Is it possible to use reflection on jruby class from java?   

    When JRuby is using BSF or JSR 223? Only to those extent that those techniques are allowed when using ruby2java? Yes. This generates common Java class squares.

    • Do I have executable classes in Jerubbe?

      I'm pretty sure what you are asking. / P>

      • Is it possible to redefine the Java class inside the JRuby script? (Just like I can redefine eg integer in C. Ruby)

        Yes, you can patch the monkey in Jeruubi, but the changes do not appear on the side of Java. Just JRB:

          import java.util.Vector square vector def foo "foo!" End and v = java.util.Vector.new v.foo # = & gt; "Foo!"  
        • Are there any limitations that prevent JRBB from being used as part of any Java application?

        Using JAVA JRB Ruby2java is still in its infancy, and I am sure it is not ready for a production environment yet. In addition, the focus is on scripting with BSF and JSR 223, which may or may not be in conformity with your goals.


    Comments

    Popular posts from this blog

    MySql variables and php -

    url rewriting - How to implement the returnurl like SO in PHP? -

    Which Python client library should I use for CouchdB? -