140141142143144145146147
extensions.put(interfaceClass, implementation); } public Object narrow(Class interfaceClass) { if (!extensions.containsKey(interfaceClass)) throw new NoSuchNarrowableException(interfaceClass); return extensions.get(interfaceClass); }
123124125126127128129130
} public Object narrow(Class interfaceClass) { Object extension = extensions.get(interfaceClass); if (extension == null) throw new NoSuchNarrowableException(interfaceClass); return extension; }