@Test public void inetAddressTest() throws Exception { assertTrue(UTIL.inetAddressFor(new IpClass("1.2.3.4")) instanceof Inet4Address); assertTrue(UTIL.inetAddressFor(new IpClass("FE80::2002:B3FF:FE1E:8329")) instanceof Inet6Address); }
public final @NonNull InetAddress inetAddressFor(final @NonNull A addr) { final A4 v4 = maybeIpv4Address(addr); if (v4 != null) { return inet4AddressFor(v4); } final A6 v6 = maybeIpv6Address(addr); checkArgument(v6 != null, "Address %s is neither IPv4 nor IPv6", addr); return inet6AddressFor(v6); }
AbstractIetfInetUtil { public final @NonNull InetAddress inetAddressFor(final @NonNull A addr) { final A4 v4 = maybeIpv4Address(addr); if (v4 != null) { return inet4AddressFor(v4); } final A6 v6 = maybeIpv6Address(addr); checkArgument(v6 != null, "Address %s is neither IPv4 nor IPv6", addr); return inet6AddressFor(v6); } }
AbstractIetfInetUtil { public final @NonNull InetAddress inetAddressFor(final @NonNull A addr) { final A4 v4 = maybeIpv4Address(addr); if (v4 != null) { return inet4AddressFor(v4); } final A6 v6 = maybeIpv6Address(addr); checkArgument(v6 != null, "Address %s is neither IPv4 nor IPv6", addr); return inet6AddressFor(v6); } protected  AbstractIetfInetUtil(final Class<A4NZ> addr4nzClass, final Class<P4> prefix4Class,
            final Class<A6NZ> addr6nzClass, final Class<P6> prefix6Class); }
AbstractIetfInetUtil { public final @NonNull InetAddress inetAddressFor(final @NonNull A addr) { final A4 v4 = maybeIpv4Address(addr); if (v4 != null) { return inet4AddressFor(v4); } final A6 v6 = maybeIpv6Address(addr); checkArgument(v6 != null, "Address %s is neither IPv4 nor IPv6", addr); return inet6AddressFor(v6); } protected  AbstractIetfInetUtil(final Class<A4NZ> addr4nzClass, final Class<P4> prefix4Class,
            final Class<A6NZ> addr6nzClass, final Class<P6> prefix6Class); final @NonNull A ipAddressFor(final byte @NonNull[] bytes); final @NonNull A ipAddressFor(final @NonNull InetAddress addr); final @NonNull ANZ ipAddressNoZoneFor(final byte @NonNull[] bytes); final @NonNull ANZ ipAddressNoZoneFor(final @NonNull InetAddress addr); final @NonNull P ipPrefixFor(final byte @NonNull[] bytes, final int mask); final @NonNull P ipPrefixFor(final @NonNull InetAddress addr, final int mask); final @NonNull InetAddress inetAddressFor(final @NonNull A addr); final @NonNull InetAddress inetAddressForNoZone(final @NonNull ANZ addr); final @NonNull Inet4Address inet4AddressFor(final @NonNull A4 addr); final @NonNull Inet4Address inet4AddressForNoZone(final @NonNull A4NZ addr); final @NonNull Inet6Address inet6AddressFor(final @NonNull A6 addr); final @NonNull Inet6Address inet6AddressForNoZone(final @NonNull A6NZ addr); final @NonNull A4NZ ipv4AddressFor(final byte @NonNull[] bytes); final @NonNull A4NZ ipv4AddressFor(final @NonNull InetAddress addr); final @NonNull A4NZ ipv4AddressFor(final int bits); final @NonNull A4NZ ipv4AddressNoZoneFor(final @NonNull A4 addr); final @NonNull A4NZ ipv4AddressFrom(final @NonNull P4 prefix); final byte @NonNull[] ipv4AddressBytes(final @NonNull A4 addr); final int ipv4AddressBits(final @NonNull A4 addr); final byte @NonNull[] ipv4AddressNoZoneBytes(final @NonNull A4NZ addr); final int ipv4AddressNoZoneBits(final @NonNull A4NZ addr); final @NonNull P4 ipv4PrefixFor(final byte @NonNull[] bytes); final @NonNull P4 ipv4PrefixFor(final byte @NonNull[] address, final int mask); final @NonNull P4 ipv4PrefixFor(final @NonNull InetAddress addr); final @NonNull P4 ipv4PrefixFor(final @NonNull InetAddress addr, final int mask); final @NonNull P4 ipv4PrefixFor(final @NonNull A4 addr); final @NonNull P4 ipv4PrefixFor(final @NonNull A4 addr, final int mask); final @NonNull P4 ipv4PrefixForNoZone(final @NonNull A4NZ addr); final @NonNull P4 ipv4PrefixForNoZone(final @NonNull A4NZ addr, final int mask); final @NonNull P4 ipv4PrefixForShort(final byte @NonNull[] address, final int mask); final @NonNull P4 ipv4PrefixForShort(final byte @NonNull[] array, final int startOffset, final int mask); final @NonNull Entry<A4NZ, Integer> splitIpv4Prefix(final @NonNull P4 prefix); final byte @NonNull[] ipv4PrefixToBytes(final @NonNull P4 prefix); final @NonNull A6NZ ipv6AddressFor(final byte @NonNull[] bytes); final @NonNull A6NZ ipv6AddressFor(final @NonNull InetAddress addr); final @NonNull A6NZ ipv6AddressNoZoneFor(final @NonNull A6 addr); final @NonNull A6NZ ipv6AddressFrom(final @NonNull P6 prefix); final byte @NonNull[] ipv6AddressBytes(final @NonNull A6 addr); final byte @NonNull[] ipv6AddressNoZoneBytes(final @NonNull A6NZ addr); final @NonNull P6 ipv6PrefixFor(final byte @NonNull[] bytes); final @NonNull P6 ipv6PrefixFor(final byte @NonNull[] address, final int mask); final @NonNull P6 ipv6PrefixFor(final @NonNull InetAddress addr); final @NonNull P6 ipv6PrefixFor(final @NonNull InetAddress addr, final int mask); final @NonNull P6 ipv6PrefixFor(final @NonNull A6 addr); final @NonNull P6 ipv6PrefixFor(final @NonNull A6 addr, final int mask); final @NonNull P6 ipv6PrefixForNoZone(final @NonNull A6NZ addr); final @NonNull P6 ipv6PrefixForNoZone(final @NonNull A6NZ addr, final int mask); final @NonNull P6 ipv6PrefixForShort(final byte @NonNull[] address, final int mask); final @NonNull P6 ipv6PrefixForShort(final byte @NonNull[] array, final int startOffset, final int mask); final @NonNull Entry<A6NZ, Integer> splitIpv6Prefix(final @NonNull P6 prefix); final byte @NonNull[] ipv6PrefixToBytes(final @NonNull P6 prefix); }
AbstractIetfInetUtil { public final @NonNull InetAddress inetAddressFor(final @NonNull A addr) { final A4 v4 = maybeIpv4Address(addr); if (v4 != null) { return inet4AddressFor(v4); } final A6 v6 = maybeIpv6Address(addr); checkArgument(v6 != null, "Address %s is neither IPv4 nor IPv6", addr); return inet6AddressFor(v6); } protected  AbstractIetfInetUtil(final Class<A4NZ> addr4nzClass, final Class<P4> prefix4Class,
            final Class<A6NZ> addr6nzClass, final Class<P6> prefix6Class); final @NonNull A ipAddressFor(final byte @NonNull[] bytes); final @NonNull A ipAddressFor(final @NonNull InetAddress addr); final @NonNull ANZ ipAddressNoZoneFor(final byte @NonNull[] bytes); final @NonNull ANZ ipAddressNoZoneFor(final @NonNull InetAddress addr); final @NonNull P ipPrefixFor(final byte @NonNull[] bytes, final int mask); final @NonNull P ipPrefixFor(final @NonNull InetAddress addr, final int mask); final @NonNull InetAddress inetAddressFor(final @NonNull A addr); final @NonNull InetAddress inetAddressForNoZone(final @NonNull ANZ addr); final @NonNull Inet4Address inet4AddressFor(final @NonNull A4 addr); final @NonNull Inet4Address inet4AddressForNoZone(final @NonNull A4NZ addr); final @NonNull Inet6Address inet6AddressFor(final @NonNull A6 addr); final @NonNull Inet6Address inet6AddressForNoZone(final @NonNull A6NZ addr); final @NonNull A4NZ ipv4AddressFor(final byte @NonNull[] bytes); final @NonNull A4NZ ipv4AddressFor(final @NonNull InetAddress addr); final @NonNull A4NZ ipv4AddressFor(final int bits); final @NonNull A4NZ ipv4AddressNoZoneFor(final @NonNull A4 addr); final @NonNull A4NZ ipv4AddressFrom(final @NonNull P4 prefix); final byte @NonNull[] ipv4AddressBytes(final @NonNull A4 addr); final int ipv4AddressBits(final @NonNull A4 addr); final byte @NonNull[] ipv4AddressNoZoneBytes(final @NonNull A4NZ addr); final int ipv4AddressNoZoneBits(final @NonNull A4NZ addr); final @NonNull P4 ipv4PrefixFor(final byte @NonNull[] bytes); final @NonNull P4 ipv4PrefixFor(final byte @NonNull[] address, final int mask); final @NonNull P4 ipv4PrefixFor(final @NonNull InetAddress addr); final @NonNull P4 ipv4PrefixFor(final @NonNull InetAddress addr, final int mask); final @NonNull P4 ipv4PrefixFor(final @NonNull A4 addr); final @NonNull P4 ipv4PrefixFor(final @NonNull A4 addr, final int mask); final @NonNull P4 ipv4PrefixForNoZone(final @NonNull A4NZ addr); final @NonNull P4 ipv4PrefixForNoZone(final @NonNull A4NZ addr, final int mask); final @NonNull P4 ipv4PrefixForShort(final byte @NonNull[] address, final int mask); final @NonNull P4 ipv4PrefixForShort(final byte @NonNull[] array, final int startOffset, final int mask); final @NonNull Entry<A4NZ, Integer> splitIpv4Prefix(final @NonNull P4 prefix); final byte @NonNull[] ipv4PrefixToBytes(final @NonNull P4 prefix); final @NonNull A6NZ ipv6AddressFor(final byte @NonNull[] bytes); final @NonNull A6NZ ipv6AddressFor(final @NonNull InetAddress addr); final @NonNull A6NZ ipv6AddressNoZoneFor(final @NonNull A6 addr); final @NonNull A6NZ ipv6AddressFrom(final @NonNull P6 prefix); final byte @NonNull[] ipv6AddressBytes(final @NonNull A6 addr); final byte @NonNull[] ipv6AddressNoZoneBytes(final @NonNull A6NZ addr); final @NonNull P6 ipv6PrefixFor(final byte @NonNull[] bytes); final @NonNull P6 ipv6PrefixFor(final byte @NonNull[] address, final int mask); final @NonNull P6 ipv6PrefixFor(final @NonNull InetAddress addr); final @NonNull P6 ipv6PrefixFor(final @NonNull InetAddress addr, final int mask); final @NonNull P6 ipv6PrefixFor(final @NonNull A6 addr); final @NonNull P6 ipv6PrefixFor(final @NonNull A6 addr, final int mask); final @NonNull P6 ipv6PrefixForNoZone(final @NonNull A6NZ addr); final @NonNull P6 ipv6PrefixForNoZone(final @NonNull A6NZ addr, final int mask); final @NonNull P6 ipv6PrefixForShort(final byte @NonNull[] address, final int mask); final @NonNull P6 ipv6PrefixForShort(final byte @NonNull[] array, final int startOffset, final int mask); final @NonNull Entry<A6NZ, Integer> splitIpv6Prefix(final @NonNull P6 prefix); final byte @NonNull[] ipv6PrefixToBytes(final @NonNull P6 prefix);  }