[fpc-pascal] Java equivalent of Pascal's class reference functionality
mailinglists at geldenhuys.co.uk
Thu Jun 9 01:44:39 CEST 2016
On 2016-06-09 00:23, Ryan Gonzalez wrote:
> Not sure about your question exactly, but everything in Java is passed by
Not quite what I meant. :) The Object Pascal feature is that my example
code - ExecuteVisitor() - doesn't know at compile time what instance
(any descendant of TVisitor) it is going to instantiate. That
information is only known at runtime.
The ExecuteVisitor() will create an instance of the class I specify as
the second argument, and then use it as normal.
More information about the fpc-pascal