Changes to names of dynamically loaded classes.

Unless you’re interested in the SkyView internals you probably don’t need to read this one!

None of the changes discussed below will affect how SkyView is called or what it does. If you have been building your own version of SkyView classes or using SkyView Java classes in other applications you may want check to see if this will affect you.

One of the main design goals of the Java-based implementation of SkyView is to enable new capabilities by dynamically loading the major components of the system. So the projections, samplers, and such are all loaded based upon default names or settings the user has specified. Recently I’ve begun rationalizing this, so that the same scheme is used everywhere. Currently in some cases you specify the entire class name (e.g., skyview.process.imagefinder.Exposure). In others you specify a part of the name and it builds up the class, e.g., projection=Ait means load the class skyview.geometry.project.AitProjecter. In still others you can specify the class name and it will look both within a default package and for the class name exactly as you specified it.

In the next release all of these will use this last approach to create the class, calling the method:

Object x  = skyview.util.Utilities.newInstance(String name, String pkg)

This method first looks for the class with the package name prepended to the class and then for the class name alone. Each type of object (projecters, samplers imagefinders, …) has a ‘default’ package, or the user can put them in any package and give the fully qualified class name as the appropriate setting.

The effect of this is that the names of some of the low level classes in SkyView will change. The class skyview.geometry.projecter.AitProjecter becomes skyview.geometry.projecter.Ait. Similarly skyview.geometry.sampler.ClipSampler becomes skyview.geometry.sampler.Clip. The functionality of these classes is unchanged. This eliminates some redundancy from the class names, allows a more uniform handling of errors in the loading of classes, and allows shorter setting values in some cases.

Please let us know if you have questions or concerns about this upcoming change.

This entry was posted in Discussion. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *