@Deprecated
    public <T extends KnowledgeIndex> T getKnowledge(Class<T> type) {
        return getKnowledge(type, m -> {
            try {
                return type.getConstructor(Model.class).newInstance(this);
            } catch (NoSuchMethodException e) {
                String message = String.format(
                        "KnowledgeIndex for type `%s` does not expose a public constructor that accepts a Model",
                        type);
                throw new RuntimeException(message, e);
            } catch (ReflectiveOperationException e) {
                String message = String.format(
                        "Unable to create a KnowledgeIndex for type `%s`: %s",
                        type,
                        e.getMessage());
                throw new RuntimeException(message, e);
            }
        });
    }
This method is deprecated. Use the {@code of} method of the
{@link KnowledgeIndex} you wish to create instead.

@param type Type of knowledge index to retrieve.
@param <T> The type of knowledge index to retrieve.
@return Returns the computed knowledge index.
smithy-model/src/main/java/software/amazon/smithy/model/Model.java