/** Notifies subclasses that a query is about to be processed. * @param template the template */ @Override protected final void beforeLookup(Template template) { Class type = template.getType(); if (type == Object.class) { // ok, this is likely query for everything java.util.Set all; Object prev = null; try { prev = CookieSet.entryAllClassesMode(); Object ignoreResult = node.getCookie(Node.Cookie.class); } finally { all = CookieSet.exitAllClassesMode(prev); } Iterator it = all.iterator(); while (it.hasNext()) { Class c = (Class) it.next(); updateLookupAsCookiesAreChanged(c); } // update Node.Cookie if not yet if (!queriedCookieClasses.contains(Node.Cookie.class)) { updateLookupAsCookiesAreChanged(Node.Cookie.class); } } if (!queriedCookieClasses.contains(type)) { updateLookupAsCookiesAreChanged(type); } }