List of usage examples for org.apache.wicket.core.util.resource ClassPathResourceFinder ClassPathResourceFinder
public ClassPathResourceFinder(String prefix)
From source file:codetroopers.wicket.web.HotReloadingWicketFilter.java
License:Apache License
/** * Reset the class resolver, it removes stale classes. * Optimization is possible by removing from the map only changed classes * * NOTICE : as long as we don't touch the HomePage, this seems to work *///from ww w. j ava 2s .c o m private void resetClassAndResourcesCaches() { final WebApplication application = getApplication(); if (application != null) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Resetting the Application's ClassResolver and Resource Finders"); } application.getApplicationSettings().setClassResolver(new HotReloadingClassResolver()); //we reset the resourceStreamLocator cache by recreating resource finders List<IResourceFinder> resourceFinders = Lists.newArrayList(); resourceFinders .add(new org.apache.wicket.util.file.Path(compilationManager.getDestination().toString())); resourceFinders.add(new ClassPathResourceFinder("")); application.getResourceSettings().setResourceFinders(resourceFinders); } }