Issue Details (XML | Word | Printable)

Key: RUBY2JAVA-6
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: automatthew
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ruby2java

multiple constructors with dedicated constructor_signature method

Created: 25/Nov/09 10:31 PM   Updated: 25/Nov/09 10:31 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Tags:


 Description  « Hide

Instead of using Smurf.signature(:initialize, ...), we could have a constructor_signature method that maps arbitrary methods and their signatures to Java constructors.

class MultiConstructors
  def string_init(string)
  end
  
  def integer_init(integer)
  end
  
  if defined? Ruby2Java
    constructor_signature :string_init, [java.lang.String] => Java::void
    constructor_signature :integer_init, [Java::int] => Java::void
  end
end


There are no comments yet on this issue.