/** Get a cookie from the node. * Uses the cookie set as determined by {@link #getCookieSet}. * * @param type the representation class * @return the cookie or <code>null</code> */ @Override public <T extends Node.Cookie> T getCookie(Class<T> type) { if (lookup instanceof CookieSet) { CookieSet c = (CookieSet) lookup; return c.getCookie(type); } else { return super.getCookie(type); } }
private static <T extends Cookie> void addCookie(Class<T> c, CookieSet cs, InstanceContent i){ T t = cs.getCookie(c); if(t != null){ i.add(t); } }
/** Get a cookie from the node. * Uses the cookie set as determined by {@link #getCookieSet}. * * @param type the representation class * @return the cookie or <code>null</code> */ public Node.Cookie getCookie (Class type) { if (lookup instanceof CookieSet) { CookieSet c = (CookieSet)lookup; return c.getCookie (type); } else { return super.getCookie (type); } }
/** Get a cookie from the node. * Uses the cookie set as determined by {@link #getCookieSet}. * * @param type the representation class * @return the cookie or <code>null</code> */ public Node.Cookie getCookie (Class type) { if (lookup instanceof CookieSet) { CookieSet c = (CookieSet)lookup; return c.getCookie (type); } else { return super.getCookie (type); } }
/** Look for a cookie in the current cookie set matching the requested class. * * @param type the class to look for * @return an instance of that class, or <code>null</code> if this class of cookie * is not supported */ public Node.Cookie getCookie (Class type) { CookieSet c = cookieSet; if (c != null) { Node.Cookie cookie = c.getCookie (type); if (cookie != null) return cookie; } return super.getCookie (type); }
); getCookieSet().add ((Node.Cookie)support); return getCookieSet ().getCookie(c); } catch (IOException ex) {