dimanche 28 juin 2015

Create A Compile Time Index

Currently I use a classreader to find specific annotated classes throughout my web application. Instead i'd like to create an index when the application starts so I can scan that for relevant paths instead of using the classreader. I've semi-simplified what the reflection process currently has to do by providing a package path in my web.xml file so the system doesn't have to scan the entire class list, but that approach is causing some organizational problems as the application grows and instead i'd like to just scan the entire classpath at startup and index the relevant files.

What is the best approach? Should I be programatically building an xml file on startup, storing it within the application and then removing on shutdown? Or possibly a static hashmap of sorts? Need some directional advice on how to get started.





Aucun commentaire:

Enregistrer un commentaire