Login  Register

Re: dev: overriding multiple classes

Posted by Volker Baecker on Aug 24, 2007; 9:20am
URL: http://imagej.273.s1.nabble.com/dev-overriding-multiple-classes-tp3698479p3698484.html

Hello,
I suppose you want to subclass multiple classes (overriding some of the
methods).
Create subclasses of ImagePlus and Calibration. They must be in the same
package as their superclasses (to have access to the package-private
members). Create a jar-file with your subclasses and put the jar file in
the same directory as your plugin that uses them. You could as well put
them somewhere else in the classpath or add the location to the classpath.
Volker

Leonard Sitongia a écrit :

> Developers, a question for you,
>
> What is the best practice for overriding multiple classes in ij that
> aren't related in a class hierarchy?  I could write invisible plugins
> (no underscore) and call them from the plugin I want visible (with the
> underscore)?
>
> In this case, I want to extend ImagePlus and Calibration, and maybe more.
>
> Thanks.
>

--
passerelle antivirus du campus CNRS de Montpellier
--