Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/cadet/helpers.rb

Overview

This is to fix a (bug?) in jruby. typically, when a ruby symbol is passed into a native java function, it should be converted to a java string by jruby. unfortunately, this conversion does not seem to take place when the native java function is overloaded. This method allows me to specify :symbol.to_java_string, so that I do not need to create a Ruby string from a symbol, just so that i can get a native java string

Constant Summary collapse

JString =
java.lang.String

Instance Method Summary collapse

Instance Method Details

#to_java_stringObject



12
13
14
# File 'lib/cadet/helpers.rb', line 12

def to_java_string
  to_java(JString)
end