void removeImpl(Object cookie) { synchronized (this) { unregisterCookie(cookie.getClass(), cookie); } if (ic != null) { ic.remove(cookie); } }
/** Removes cookie from the class and all its superclasses and * superinterfaces. * * @param c class or null * @param cookie cookie to attach */ private void unregisterCookie(Class<?> c, Object cookie) { if ((c == null) || !Node.Cookie.class.isAssignableFrom(c)) { return; } Class<? extends Node.Cookie> nc = c.asSubclass(Node.Cookie.class); // if different cookie is attached to class c stop removing R r = findR(nc); if (r != null) { // remove the cookie r.remove((Node.Cookie)cookie); } unregisterCookie(c.getSuperclass(), cookie); Class[] inter = c.getInterfaces(); for (int i = 0; i < inter.length; i++) { unregisterCookie(inter[i], cookie); } }
r.cookies = null; for (Cookie c : arr) { unregisterCookie(cookie.getClass(), c); unregisterCookie(cookie.getClass(), cookie); if (ic != null) { ic.remove(cookie);
/** * Unregisters a Factory for given cookie class * @since 2.6 */ public void remove(Class<? extends Node.Cookie> cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } CookieEntry ce = null; synchronized (this) { R r = findR(cookieClass); if (r != null) { Node.Cookie c = r.cookie(); if (c instanceof CookieEntry) { ce = (CookieEntry) c; if (ce.factory == factory) { unregisterCookie(cookieClass, c); } } } } if (ic != null && ce != null) { ic.remove(ce, C.INSTANCE); } fireChangeEvent(); }
unregisterCookie(cookieClass[i], c);
/** Remove a cookie from the set. * @param cookie the cookie to remove */ public void remove (Node.Cookie cookie) { synchronized (this) { unregisterCookie (cookie.getClass (), cookie); } fireChangeEvent (); }
/** Remove a cookie from the set. * @param cookie the cookie to remove */ public void remove (Node.Cookie cookie) { synchronized (this) { unregisterCookie (cookie.getClass (), cookie); } fireChangeEvent (); }
/** Removes cookie from the class and all its superclasses and * superinterfaces. * * @param c class or null * @param cookie cookie to attach */ private void unregisterCookie (Class c, Node.Cookie cookie) { if ( c == null || !Node.Cookie.class.isAssignableFrom(c) ) return; // if different cookie is attached to class c stop removing R r = findR (c); if (r != null) { // remove the cookie r.remove (cookie); } unregisterCookie (c.getSuperclass (), cookie); Class[] inter = c.getInterfaces (); for (int i = 0; i < inter.length; i++) { unregisterCookie (inter[i], cookie); } }
/** Removes cookie from the class and all its superclasses and * superinterfaces. * * @param c class or null * @param cookie cookie to attach */ private void unregisterCookie (Class c, Node.Cookie cookie) { if ( c == null || !Node.Cookie.class.isAssignableFrom(c) ) return; // if different cookie is attached to class c stop removing R r = findR (c); if (r != null) { // remove the cookie r.remove (cookie); } unregisterCookie (c.getSuperclass (), cookie); Class[] inter = c.getInterfaces (); for (int i = 0; i < inter.length; i++) { unregisterCookie (inter[i], cookie); } }
/** * Unregisters a Factory for given cookie class * @since 2.6 */ public void remove(Class cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { R r = findR(cookieClass); if (r != null) { Node.Cookie c = r.cookie(); if (c instanceof CookieEntry) { CookieEntry ce = (CookieEntry)c; if (ce.factory == factory) { unregisterCookie (cookieClass, c); } } } } fireChangeEvent (); }
/** * Unregisters a Factory for given cookie class * @since 2.6 */ public void remove(Class cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { R r = findR(cookieClass); if (r != null) { Node.Cookie c = r.cookie(); if (c instanceof CookieEntry) { CookieEntry ce = (CookieEntry)c; if (ce.factory == factory) { unregisterCookie (cookieClass, c); } } } } fireChangeEvent (); }
/** * Unregisters a Factory for given cookie classes * @since 2.6 */ public void remove(Class[] cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { for (int i = 0; i < cookieClass.length; i++) { R r = findR(cookieClass[i]); if (r != null) { Node.Cookie c = r.cookie(); if (c instanceof CookieEntry) { CookieEntry ce = (CookieEntry)c; if (ce.factory == factory) { unregisterCookie (cookieClass[i], c); } } } } } fireChangeEvent (); }
/** * Unregisters a Factory for given cookie classes * @since 2.6 */ public void remove(Class[] cookieClass, Factory factory) { if (factory == null) { throw new IllegalArgumentException(); } synchronized (this) { for (int i = 0; i < cookieClass.length; i++) { R r = findR(cookieClass[i]); if (r != null) { Node.Cookie c = r.cookie(); if (c instanceof CookieEntry) { CookieEntry ce = (CookieEntry)c; if (ce.factory == factory) { unregisterCookie (cookieClass[i], c); } } } } } fireChangeEvent (); }