Module JavaBridge
In: ruby/comm_abstract.rb
ruby/comm_bstream.rb
ruby/comm_xmlrpc.rb
ruby/jbridge.rb

Methods

Classes and Modules

Module JavaBridge::TransferObjectFilter
Class JavaBridge::AbstractBridgeConnection
Class JavaBridge::BinStreamBridge
Class JavaBridge::JClass
Class JavaBridge::JClassInfo
Class JavaBridge::JClassRepository
Class JavaBridge::JCreatedObject
Class JavaBridge::JExtendedClass
Class JavaBridge::JObject
Class JavaBridge::JProxyObject
Class JavaBridge::XMLRPCBridge

Public Instance methods

Sending a shutdown message to the JVM.

Creating an proxy instance that can override public and protected methods of the class and interfaces. Adding the singleton method to the instance, the Ruby program can implement the Java interfaces or abstract class. The class name parameter can take zero or one class and arbitrary number of interfaces. Those class names are specified by Symbol(only one) or String(separated by ","). If Ruby class overrides the Java method that has the same, the Java method delegates the operation to Ruby method. The abstract method delegates Ruby method to execute immediately. Corresponding notatin: :SomeJavaClassName.jext or :some_package_ClassName.jext

 jimport is almost similar to "import" statement of Java.
 Ex:
  • import "java.awt.*"
  • import "java.awt.*,java.awt.event.*"
  • import "java.util.List"
 The later entry is given a priority.

Creating an instance of the concrete class. The class name can be specified by String and Symbol. Ex: "java.awt.Point" corresponds width :java_awt_Point. The return value is the proxy object for the instance of the Java. Corresponding notatin: :SomeJavaClassName.jnew or :some_package_ClassName.jnew

Creating a static reference to the Java class. Through the reference, the any static methods and fields can be called by Ruby. Corresponding notatin: :SomeJavaClassName.jclass or :some_package_ClassName.jclass

Stopping the main thread so as not to finish the Ruby program. (The GUI programs can wait for messages from the JVM.) Calling "wakeup_thread", the Ruby program resumes the main thread. (Before calling "exit" to terminate the Ruby program, the main thread

 should be on the running state.)

Resuming the main thread.

[Validate]