Repository: netty/netty
File: resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolverBuilder.java (Java)

Code before:
    }

    /**
     * Use {@link #datagramChannelFactory()}
     */
    @Deprecated
    protected ChannelFactory<? extends DatagramChannel> channelFactory() {
        return this.datagramChannelFactory;
    }

    ChannelFactory<? extends DatagramChannel> datagramChannelFactory() {
        return this.datagramChannelFactory;
    }

    /**
     * Sets the {@link ChannelFactory} that will create a {@link DatagramChannel}.
     * If <a href="https://tools.ietf.org/html/rfc7766">TCP fallback</a> should be supported as well it is required
     * to call the {@link #socketChannelFactory(ChannelFactory) or {@link #socketChannelType(Class)}} method.
     *
     * @param datagramChannelFactory the {@link ChannelFactory}
     * @return {@code this}
     * @deprecated use {@link #datagramChannelFactory(ChannelFactory)}
     */
    @Deprecated
    public DnsNameResolverBuilder channelFactory(ChannelFactory<? extends DatagramChannel> datagramChannelFactory) {
        datagramChannelFactory(datagramChannelFactory);
        return this;
    }

    /**
     * Sets the {@link ChannelFactory} that will create a {@link DatagramChannel}.
     * If <a href="https://tools.ietf.org/html/rfc7766">TCP fallback</a> should be supported as well it is required
     * to call the {@link #socketChannelFactory(ChannelFactory) or {@link #socketChannelType(Class)}} method.
     *
     * @param datagramChannelFactory the {@link ChannelFactory}
     * @return {@code this}
     */
    public DnsNameResolverBuilder datagramChannelFactory(
            ChannelFactory<? extends DatagramChannel> datagramChannelFactory) {
        this.datagramChannelFactory = datagramChannelFactory;
        return this;
    }

    /**
     * Sets the {@link ChannelFactory} as a {@link ReflectiveChannelFactory} of this type.
     * Use as an alternative to {@link #channelFactory(ChannelFactory)}.
     * If <a href="https://tools.ietf.org/html/rfc7766">TCP fallback</a> should be supported as well it is required
     * to call the {@link #socketChannelFactory(ChannelFactory) or {@link #socketChannelType(Class)}} method.
     *
     * @param channelType the type
     * @return {@code this}

Review comment (suggestion):
Consider adding `<p>` in between lines 136 and 137 to separate initial line with other clarifications

Code after:
    }

    ChannelFactory<? extends DatagramChannel> datagramChannelFactory() {
        return this.datagramChannelFactory;
    }

    /**
     * Sets the {@link ChannelFactory} that will create a {@link DatagramChannel}.
     * <p>
     * If <a href="https://tools.ietf.org/html/rfc7766">TCP fallback</a> should be supported as well it is required
     * to call the {@link #socketChannelFactory(ChannelFactory) or {@link #socketChannelType(Class)}} method.
     *
     * @param datagramChannelFactory the {@link ChannelFactory}
     * @return {@code this}
     * @deprecated use {@link #datagramChannelFactory(ChannelFactory)}
     */
    @Deprecated
    public DnsNameResolverBuilder channelFactory(ChannelFactory<? extends DatagramChannel> datagramChannelFactory) {
        datagramChannelFactory(datagramChannelFactory);
        return this;
    }

    /**
     * Sets the {@link ChannelFactory} that will create a {@link DatagramChannel}.
     * <p>
     * If <a href="https://tools.ietf.org/html/rfc7766">TCP fallback</a> should be supported as well it is required
     * to call the {@link #socketChannelFactory(ChannelFactory) or {@link #socketChannelType(Class)}} method.
     *
     * @param datagramChannelFactory the {@link ChannelFactory}
     * @return {@code this}
     */
    public DnsNameResolverBuilder datagramChannelFactory(
            ChannelFactory<? extends DatagramChannel> datagramChannelFactory) {
        this.datagramChannelFactory = datagramChannelFactory;
        return this;
    }

    /**
     * Sets the {@link ChannelFactory} as a {@link ReflectiveChannelFactory} of this type.
     * Use as an alternative to {@link #channelFactory(ChannelFactory)}.
     * <p>
     * If <a href="https://tools.ietf.org/html/rfc7766">TCP fallback</a> should be supported as well it is required
     * to call the {@link #socketChannelFactory(ChannelFactory) or {@link #socketChannelType(Class)}} method.
     *
     * @param channelType the type
     * @return {@code this}
     * @deprecated use {@link #datagramChannelType(Class)}
     */
    @Deprecated
    public DnsNameResolverBuilder channelType(Class<? extends DatagramChannel> channelType) {
        return datagramChannelFactory(new ReflectiveChannelFactory<DatagramChannel>(channelType));