Module: JavaMethod

Defined in:
lib/ycn/java/java_method.rb

Instance Method Summary collapse

Instance Method Details

#java_show_contentObject



10
11
12
13
14
15
16
17
18
# File 'lib/ycn/java/java_method.rb', line 10

def java_show_content
  @content.split("\n").map { |line|
    unless line =~ /[\+\(]\s*$/
      line += ';'
    end
    
    line
  }.join("\n")
end

#java_signatureObject



2
3
4
5
6
7
8
# File 'lib/ycn/java/java_method.rb', line 2

def java_signature
  params = @parameters.map{ |p|
    "#{camelize p} p#{p[0].chr.downcase}#{camelize p}"
  }.join(', ')
  
  "public #{@type} #{low_camelize @name}(#{params})"
end