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

Method getPort

output/java_guava/1.4.19/HostAndPort.java:113–116  ·  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

111
112
113 public int getPort() {
114 checkState(hasPort());
115 return port;
116 }
117
118 /**
119 * 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