Name: mc57594 Date: 11/15/99
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, native threads, symcjit)
Much of the software I develop extensively uses reflection for the loading of
classes at runtime. These classes often implement an interface which I use as
the "contract" to decide whether the class in suitable for loading (it is
easier to check if it implements an interface rather than if it implements all
the required methods). To make this less vague, here is an example.
I have a logging system which loads the required logging classes at runtime
based on user/sys admin choices. These logging classes must have a constructor
with a specific signature, a number of instance methods and a number of static
methods. Here's the problem: You cannot specify constructor signatures, nor
static methods in an interface.
The second issue is a stumper. The static method are required to tell a
configuration utility what properties the logging object needs specified, so I
want to make this static, and not have to construct an object only to find out
what information it requires!! If I specify the static methods as non-static
within the interface, then they can't be implemented as static within any
derived classes. Nor can I use static final constants for this particular
(Review ID: 97779)