R
Richard Maher
Hi,
I have an interface that requires an implementer to cut code that 99%
sure is going to need some variables that are built at run-time. The
class to be developed will also be loaded at run-time via Reflection.
Most people I have consulted recommend going the null Constructor in
combination with Setters, or an INIT() method, to communicate the
ambient variables to the loaded class. I, on the other hand, would like
to go the Constructor-Injection-esque root of attempting to invoke a
version of the Contstructor with the arguments I specify. (Maybe
failover to null constructor on InvocationException) Is there something
intrinsically wrong with doing this in Java? (I know there are Abstract
Classes but I have only Abstract Methods.)
If you like to know the real example then what I'd like to pass to the
Constructor is the ParentFrame and an Application name.
London-to-a-brick the callee will create a Dialog Box.
Cheers Richard Maher
I have an interface that requires an implementer to cut code that 99%
sure is going to need some variables that are built at run-time. The
class to be developed will also be loaded at run-time via Reflection.
Most people I have consulted recommend going the null Constructor in
combination with Setters, or an INIT() method, to communicate the
ambient variables to the loaded class. I, on the other hand, would like
to go the Constructor-Injection-esque root of attempting to invoke a
version of the Contstructor with the arguments I specify. (Maybe
failover to null constructor on InvocationException) Is there something
intrinsically wrong with doing this in Java? (I know there are Abstract
Classes but I have only Abstract Methods.)
If you like to know the real example then what I'd like to pass to the
Constructor is the ParentFrame and an Application name.
London-to-a-brick the callee will create a Dialog Box.
Cheers Richard Maher