You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: java_class.rb
    path of file: ./repos/jruby/lib/ruby/stdlib/jruby/compiler
    
    the code of the file until where you have to start completion: module JRuby::Compiler
  module JavaGenerator
  
    
    def return_string
      has_java_signature!
      if return_type.void?
        "return;"
      else
        # Can't return wrapped array as primitive array
        cast_to = return_type.is_array ? return_type.fully_typed_name : return_type.wrapper_name
        "return (#{cast_to})ruby_result.toJava(#{return_type.name}.class);"
      end