@Test public void testGetDefaultInstance() throws Exception { final Constructor<IpPrefixBuilder> constructor = IpPrefixBuilder.class.getDeclaredConstructor(); assertFalse(constructor.isAccessible()); constructor.setAccessible(true); final IpPrefixBuilder newInstance = constructor.newInstance(); assertNotNull(newInstance); testIpv6("ff00::/8"); testIpv4("192.0.2.1/24"); }
public static IpPrefix getDefaultInstance(final String defaultValue) { return IPV4_PATTERN.matcher(defaultValue).matches() ? new IpPrefix(new Ipv4Prefix(defaultValue)) : new IpPrefix(new Ipv6Prefix(defaultValue)); }
IpPrefixBuilder { public static IpPrefix getDefaultInstance(final String defaultValue) { return IPV4_PATTERN.matcher(defaultValue).matches() ? new IpPrefix(new Ipv4Prefix(defaultValue)) : new IpPrefix(new Ipv6Prefix(defaultValue)); } }
IpPrefixBuilder { public static IpPrefix getDefaultInstance(final String defaultValue) { return IPV4_PATTERN.matcher(defaultValue).matches() ? new IpPrefix(new Ipv4Prefix(defaultValue)) : new IpPrefix(new Ipv6Prefix(defaultValue)); } private  IpPrefixBuilder(); }
IpPrefixBuilder { public static IpPrefix getDefaultInstance(final String defaultValue) { return IPV4_PATTERN.matcher(defaultValue).matches() ? new IpPrefix(new Ipv4Prefix(defaultValue)) : new IpPrefix(new Ipv6Prefix(defaultValue)); } private  IpPrefixBuilder(); static IpPrefix getDefaultInstance(final String defaultValue); }
IpPrefixBuilder { public static IpPrefix getDefaultInstance(final String defaultValue) { return IPV4_PATTERN.matcher(defaultValue).matches() ? new IpPrefix(new Ipv4Prefix(defaultValue)) : new IpPrefix(new Ipv6Prefix(defaultValue)); } private  IpPrefixBuilder(); static IpPrefix getDefaultInstance(final String defaultValue);  }