class Injectable<T> {
    private final Class<T> cls;
    private final Supplier<T> supplier;

    Injectable(Class<T> cls, Supplier<T> supplier) {
        this.cls = requireNonNull(cls);
        this.supplier = supplier; // Nullable
    }

    public Class<T> get() {
        return cls;
    }

    boolean hasSupplier() {
        return supplier != null;
    }

    public Supplier<T> supplier() {<FILL_FUNCTION_BODY>}

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null) {
            return false;
        }
        if (getClass() != o.getClass()) {
            return false;
        }
        final Injectable<?> that = (Injectable<?>) o;
        return cls.equals(that.cls) &&
            Objects.equals(supplier, that.supplier);
    }

    @Override
    public int hashCode() {
        return Objects.hash(cls, supplier);
    }
}

        return Optional.ofNullable(supplier).orElseThrow(
            () -> new UnsupportedOperationException(format(
                "Injectable %s does not have a supplier.",
                cls.getName()
            ))
        );
    
<no_super_class>