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

Method getPort

corpus/java/training/guava/net/HostAndPort.java:108–111  ·  view source on GitHub ↗

Get the current port number, failing if no port is defined. @return a validated port number, in the range [0..65535] @throws IllegalStateException if no port is defined. You can use #withDefaultPort(int) to prevent this from occurring.

()

Source from the content-addressed store, hash-verified

106 * to prevent this from occurring.
107 */
108 public int getPort() {
109 checkState(hasPort());
110 return port;
111 }
112
113 /**
114 * Returns the current port number, with a default if no port is defined.

Callers

nothing calls this directly

Calls 2

hasPortMethod · 0.95
checkStateMethod · 0.45

Tested by

no test coverage detected