continue

JavaDot Notation: calling Java from Scheme using Reflection

symbols containing "." or "$" = Java methods, constructors, or fields


(.println X Y) "." at beginning ==> instance method
(Math.sin 0.0) "." in middle only ==> static method
(JButton. S)"." at end ==> constructor
System.out$ "$" at end ==> static field
(.first$ x 5)initial ".", terminal "$"instance field
// Java
System.out.println(new JButton("Hello").toString());   
;; JScheme
(.println System.out$ (.toString (JButton. "Hello")))    

continue


back to top


set preferences

LL2, Saturday 9 November 2002, Tim Hickey/Ken Anderson