MCPcopy Create free account
hub / github.com/antlr/codebuff / fromHost

Method fromHost

output/java_guava/1.4.16/HostAndPort.java:161–165  ·  view source on GitHub ↗

Build a HostAndPort instance from a host only. Note: Non-bracketed IPv6 literals are allowed. Use #requireBracketsForIPv6() to prohibit these. @param host the host-only string to parse. Must not contain a port number. @return if parsing was successful, a populated HostAndPort object. @t

(String host)

Source from the content-addressed store, hash-verified

159
160
161 public static HostAndPort fromHost(String host) {
162 HostAndPort parsedHost = fromString(host);
163 checkArgument(!parsedHost.hasPort(), "Host has a port: %s", host);
164 return parsedHost;
165 }
166
167 /**
168 * Split a freeform string into a host and port, without strict validation.

Callers

nothing calls this directly

Calls 3

fromStringMethod · 0.95
hasPortMethod · 0.95
checkArgumentMethod · 0.45

Tested by

no test coverage detected