JVM Languages
jreflect.txt
Associated article: Java Reflection & Smalltalk-Like Method Dispatching
Tags: Parallel JVM Languages
Published source code accompanying the article by Barry Feigenbaum in which he examines the Java Reflection APIs which can be used to provide ad hoc polymorphism support. Also see JREFLECT.ZIP.
Java Reflection & Smaltalk-like Method Dispatching
by Barry Feigenbaum
Example 1:
(a)
class Bird {
method fly(){ ... }
}
class Plane {
method fly() { ... }
}
class Angel {
method fly(){ ... }
}
class Leaf {
method fly(){ ... }
}
(b)
flyer = new Bird()
flyer.fly()
flyer = new Plane()
flyer.fly()
flyer = new ...


