Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.1, JRuby 1.1.1, JRuby 1.1.2, JRuby 1.1.3, JRuby 1.1.4, JRuby 1.1.5, JRuby 1.1.6, JRuby 1.2, JRuby 1.x+
-
Fix Version/s: None
-
Component/s: Java Integration
-
Labels:None
-
Environment:Hidejruby 1.1.6 (ruby 1.8.6 patchlevel 114) (2008-12-17 rev 8388) [amd64-java]
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode)
Linux 2.6.27-12-generic #1 SMP Thu Feb 5 09:26:42 UTC 2009 x86_64 GNU/Linux
Showjruby 1.1.6 (ruby 1.8.6 patchlevel 114) (2008-12-17 rev 8388) [amd64-java] Java(TM) SE Runtime Environment (build 1.6.0_11-b03) Java HotSpot(TM) 64-Bit Server VM (build 11.0-b16, mixed mode) Linux 2.6.27-12-generic #1 SMP Thu Feb 5 09:26:42 UTC 2009 x86_64 GNU/Linux
-
Number of attachments :
Description
Extending / implementing abstract Java classes in JRuby does work fine
for me.
I see only a minor blemish: I can't use Ruby naming conventions to
implement the abstract methods.
E.g.
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
class ProductTreeTableNode <
org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
#[...]
def get_value_at(column_index)
case column_index
#[...]
end
#[...]
end - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This results in
Java::JavaLang::AbstractMethodError - java.lang.AbstractMethodError
whereas the following implementation works fine:
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
class ProductTreeTableNode <
org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
#[...]
def getValueAt(column_index)
case column_index
#[...]
end
#[...]
end - - - - - - - - - - - - - - - - - - - - - - - - - - - -