Object (Object proxy, Method method, Object[] args) { List<KeyedFactoryEPBean> epBeans = myEpName.getExtensionList(); //noinspection unchecked KeyT keyArg = (KeyT) args [0]; String key = getKey(keyArg); Object result = getByKey(epBeans, key, method, args); if (result == null) { result = getByKey(epBeans, null, method, args); } return result; }