/** Obtains a Lookup representing additional content of this Node. * If the lookup was provided in a constructor, it is returned here, * if not, a lookup based on the content of <link>getCookie</link> * method is provided. * * @return lookup for this node * @since 3.11 */ public final Lookup getLookup() { synchronized (listeners) { Lookup l = internalLookup(true); if (l != null) { return l; } l = findDelegatingLookup(); if (l != null) { return l; } // create new lookup and use it NodeLookup nl = new NodeLookup(this); registerDelegatingLookup(nl); return nl; } }
/** New flat lookup. */ public NodeLookup(Node n) { super(); this.node = n; addPair(new CookieSetLkp.SimpleItem<Node>(n)); }
/** Fires a change event for {@link #PROP_COOKIE}. * The old and new values are set to null. */ protected final void fireCookieChange() { Lookup l = findDelegatingLookup(); if (l instanceof NodeLookup) { ((NodeLookup) l).updateLookupAsCookiesAreChanged(null); } fireOwnPropertyChange(PROP_COOKIE, null, null); }
/** 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); } }
/** Notifies subclasses that a query is about to be processed. * @param template the template */ protected final void beforeLookup (Template template) { Class type = template.getType (); if (type == Object.class) { type = Node.Cookie.class; } if (Node.Cookie.class.isAssignableFrom (type)) { if (!queriedCookieClasses.contains (type)) { updateLookupAsCookiesAreChanged (type); } } } /** See #40734 and NodeLookupTest and CookieActionIsTooSlowTest.
/** New flat lookup. */ public NodeLookup (Node n) { super (); this.node = n; addPair (new LookupItem (n)); }
/** Obtains a Lookup represeting additional content of this Node. * If the lookup was provided in a constructor, it is returned here, * if not, a lookup based on the content of <link>getCookie</link> * method is provided. * * @return lookup for this node * @since 3.11 */ public final Lookup getLookup () { synchronized (listeners) { Lookup l = internalLookup (true); if (l != null) { return l; } l = findDelegatingLookup (); if (l != null) { return l; } // create new lookup and use it NodeLookup nl = new NodeLookup (this); registerDelegatingLookup (nl); return nl; } }
/** Notifies subclasses that a query is about to be processed. * @param template the template */ protected final void beforeLookup (Template template) { Class type = template.getType (); if (type == Object.class) { type = Node.Cookie.class; } if (Node.Cookie.class.isAssignableFrom (type)) { if (!queriedCookieClasses.contains (type)) { updateLookupAsCookiesAreChanged (type); } } } /** See #40734 and NodeLookupTest and CookieActionIsTooSlowTest.
/** New flat lookup. */ public NodeLookup (Node n) { super (); this.node = n; addPair (new LookupItem (n)); }
/** Obtains a Lookup represeting additional content of this Node. * If the lookup was provided in a constructor, it is returned here, * if not, a lookup based on the content of <link>getCookie</link> * method is provided. * * @return lookup for this node * @since 3.11 */ public final Lookup getLookup () { synchronized (listeners) { Lookup l = internalLookup (true); if (l != null) { return l; } l = findDelegatingLookup (); if (l != null) { return l; } // create new lookup and use it NodeLookup nl = new NodeLookup (this); registerDelegatingLookup (nl); return nl; } }
/** Fires a change event for {@link #PROP_COOKIE}. * The old and new values are set to null. */ protected final void fireCookieChange () { Lookup l = findDelegatingLookup (); if (l instanceof NodeLookup) { ((NodeLookup)l).updateLookupAsCookiesAreChanged (null); } fireOwnPropertyChange (PROP_COOKIE, null, null); }
/** Fires a change event for {@link #PROP_COOKIE}. * The old and new values are set to null. */ protected final void fireCookieChange () { Lookup l = findDelegatingLookup (); if (l instanceof NodeLookup) { ((NodeLookup)l).updateLookupAsCookiesAreChanged (null); } fireOwnPropertyChange (PROP_COOKIE, null, null); }