ComponentAdapter (@NotNull DefaultPicoContainer container, @Nullable ComponentAdapter excludeAdapter, @NotNull Class<?> expectedType) { if (excludeAdapter == null) { return container.getComponentAdapter(expectedType); } ComponentAdapter result = getTargetAdapter(container, expectedType, excludeAdapter.getComponentKey()); return result == null ? null : expectedType.isAssignableFrom(result.getComponentImplementation()) ? result : null; }