public Object lookup(Class clazz) { if (clazz == Node.class) { return null; } else { Object o = delegate.lookup(clazz); if (verboten.containsKey(o)) { // There might be another one of the same class. Iterator it = lookup(new Lookup.Template(clazz)).allInstances().iterator(); while (it.hasNext()) { Object o2 = it.next(); if (!verboten.containsKey(o2)) { // OK, use this one. return o2; } } // All such instances were excluded. return null; } else { return o; } } }
new NoNodeLookup(new ProxyLookup(lookups), arr), Lookups.fixed(arr), actionMap,
new NoNodeLookup(new ProxyLookup(lookups), arr), Lookups.fixed(arr), actionMap,
public Object lookup(Class clazz) { if (clazz == Node.class) { return null; } else { Object o = delegate.lookup(clazz); if (verboten.containsKey(o)) { // There might be another one of the same class. Iterator it = lookup(new Lookup.Template(clazz)).allInstances().iterator(); while (it.hasNext()) { Object o2 = it.next(); if (!verboten.containsKey(o2)) { // OK, use this one. return o2; } } // All such instances were excluded. return null; } else { return o; } } }