public static ComponentAdapter resolveAdapter(@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;
  }
public static ComponentAdapter resolveAdapter(@NotNull DefaultPicoContainer container, @Nullable ComponentAdapter excludeAdapter, @NotNull Class<?> expectedType)