It's been about 6 years since I've written Java, so please excuse the rust.
I'm working with a library method that requires that I pass it Class
objects. Since I'll have to invoke this method a dynamic number of times, each time with a slightly different Class
argument, I wanted to pass it an anonymous class.
However, all the documentation/tutorials I've been able to find so far only talk about instantiating anonymous classes, e.g.:
new className(optional argument list){classBody}
new interfaceName(){classBody}
Can I define an anonymous class without instantiating it? Or, perhaps more clearly, can I create a Class
object for an anonymous class?