I'm working on a java app that will have a lot of contributions. I want classes in a single package to somehow "self-register" themselves. Currently, we have another classes that simply adds each to a listlike this:
ourlist.add( new SomeClassName() );
This requires that each contributor add a line like this for their addition which I want to avoid. I want to get the application to scan the package, and automatically add each class to the list like above.
I've tried using some class scanning code for packages but the class types weren't playing well with ours and I'm too new to java to fully comprehend the issue.