private static List<DnsQuestionWithoutTrailingDot> newQuestions(
            String hostname, @Nullable ResolvedAddressTypes resolvedAddressTypes) {

        if (resolvedAddressTypes == null) {
            if (SystemInfo.hasIpV6()) {
                resolvedAddressTypes = ResolvedAddressTypes.IPV4_PREFERRED;
            } else {
                resolvedAddressTypes = ResolvedAddressTypes.IPV4_ONLY;
            }
        }

        final DnsQuestionWithoutTrailingDot ipV4 = DnsQuestionWithoutTrailingDot.of(hostname,
                                                                                    DnsRecordType.A);
        final DnsQuestionWithoutTrailingDot ipV6 = DnsQuestionWithoutTrailingDot.of(hostname,
                                                                                    DnsRecordType.AAAA);
        switch (resolvedAddressTypes) {
            case IPV4_ONLY:
                return ImmutableList.of(ipV4);
            case IPV6_ONLY:
                return ImmutableList.of(ipV6);
            case IPV4_PREFERRED:
                return ImmutableList.of(ipV4, ipV6);
            case IPV6_PREFERRED:
                return ImmutableList.of(ipV6, ipV4);
        }

        // Never reach here.
        throw new Error();
    }
Returns a new {@link DnsAddressEndpointGroupBuilder} with the specified hostname.

@param hostname the hostname to query DNS queries for
core/src/main/java/com/linecorp/armeria/client/endpoint/dns/DnsAddressEndpointGroup.java