public final class com.google.common.net.HostAndPort implements java.io.Serializable
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.google.common.net.HostAndPort
super_class: java.lang.Object
{
private static final int NO_PORT;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: -1
private final java.lang.String host;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int port;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean hasBracketlessColons;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private static final long serialVersionUID;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 0
private void <init>(java.lang.String, int, boolean);
descriptor: (Ljava/lang/String;IZ)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
2: aload 0
iload 2
putfield com.google.common.net.HostAndPort.port:I
3: aload 0
iload 3
putfield com.google.common.net.HostAndPort.hasBracketlessColons:Z
4: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/google/common/net/HostAndPort;
0 5 1 host Ljava/lang/String;
0 5 2 port I
0 5 3 hasBracketlessColons Z
MethodParameters:
Name Flags
host
port
hasBracketlessColons
public java.lang.String getHost();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/google/common/net/HostAndPort;
public boolean hasPort();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.google.common.net.HostAndPort.port:I
iflt 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/google/common/net/HostAndPort;
public int getPort();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual com.google.common.net.HostAndPort.hasPort:()Z
invokestatic com.google.common.base.Preconditions.checkState:(Z)V
1: aload 0
getfield com.google.common.net.HostAndPort.port:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/google/common/net/HostAndPort;
public int getPortOrDefault(int);
descriptor: (I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual com.google.common.net.HostAndPort.hasPort:()Z
ifeq 1
aload 0
getfield com.google.common.net.HostAndPort.port:I
goto 2
StackMap locals:
StackMap stack:
1: iload 1
StackMap locals:
StackMap stack: int
2: ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/google/common/net/HostAndPort;
0 3 1 defaultPort I
MethodParameters:
Name Flags
defaultPort
public static com.google.common.net.HostAndPort fromParts(java.lang.String, int);
descriptor: (Ljava/lang/String;I)Lcom/google/common/net/HostAndPort;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: iload 1
invokestatic com.google.common.net.HostAndPort.isValidPort:(I)Z
ldc "Port out of range: %s"
iload 1
invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;I)V
1: aload 0
invokestatic com.google.common.net.HostAndPort.fromString:(Ljava/lang/String;)Lcom/google/common/net/HostAndPort;
astore 2
start local 2 2: aload 2
invokevirtual com.google.common.net.HostAndPort.hasPort:()Z
ifeq 3
iconst_0
goto 4
StackMap locals: com.google.common.net.HostAndPort
StackMap stack:
3: iconst_1
StackMap locals:
StackMap stack: int
4: ldc "Host has a port: %s"
aload 0
invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;Ljava/lang/Object;)V
5: new com.google.common.net.HostAndPort
dup
aload 2
getfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
iload 1
aload 2
getfield com.google.common.net.HostAndPort.hasBracketlessColons:Z
invokespecial com.google.common.net.HostAndPort.<init>:(Ljava/lang/String;IZ)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 host Ljava/lang/String;
0 6 1 port I
2 6 2 parsedHost Lcom/google/common/net/HostAndPort;
MethodParameters:
Name Flags
host
port
public static com.google.common.net.HostAndPort fromHost(java.lang.String);
descriptor: (Ljava/lang/String;)Lcom/google/common/net/HostAndPort;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokestatic com.google.common.net.HostAndPort.fromString:(Ljava/lang/String;)Lcom/google/common/net/HostAndPort;
astore 1
start local 1 1: aload 1
invokevirtual com.google.common.net.HostAndPort.hasPort:()Z
ifeq 2
iconst_0
goto 3
StackMap locals: com.google.common.net.HostAndPort
StackMap stack:
2: iconst_1
StackMap locals:
StackMap stack: int
3: ldc "Host has a port: %s"
aload 0
invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;Ljava/lang/Object;)V
4: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 host Ljava/lang/String;
1 5 1 parsedHost Lcom/google/common/net/HostAndPort;
MethodParameters:
Name Flags
host
public static com.google.common.net.HostAndPort fromString(java.lang.String);
descriptor: (Ljava/lang/String;)Lcom/google/common/net/HostAndPort;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=5, args_size=1
start local 0 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aconst_null
astore 2
start local 2 2: iconst_0
istore 3
start local 3 3: aload 0
ldc "["
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 8
4: aload 0
invokestatic com.google.common.net.HostAndPort.getHostAndPortFromBracketedHost:(Ljava/lang/String;)[Ljava/lang/String;
astore 4
start local 4 5: aload 4
iconst_0
aaload
astore 1
start local 1 6: aload 4
iconst_1
aaload
astore 2
end local 4 7: goto 17
end local 1 8: StackMap locals: java.lang.String top java.lang.String int
StackMap stack:
aload 0
bipush 58
invokevirtual java.lang.String.indexOf:(I)I
istore 4
start local 4 9: iload 4
iflt 13
aload 0
bipush 58
iload 4
iconst_1
iadd
invokevirtual java.lang.String.indexOf:(II)I
iconst_m1
if_icmpne 13
10: aload 0
iconst_0
iload 4
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 1
start local 1 11: aload 0
iload 4
iconst_1
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 2
12: goto 17
end local 1 13: StackMap locals: int
StackMap stack:
aload 0
astore 1
start local 1 14: iload 4
iflt 15
iconst_1
goto 16
StackMap locals: java.lang.String java.lang.String java.lang.String int int
StackMap stack:
15: iconst_0
StackMap locals:
StackMap stack: int
16: istore 3
end local 4 17: StackMap locals:
StackMap stack:
iconst_m1
istore 4
start local 4 18: aload 2
invokestatic com.google.common.base.Strings.isNullOrEmpty:(Ljava/lang/String;)Z
ifne 27
19: aload 2
ldc "+"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 20
iconst_0
goto 21
StackMap locals: int
StackMap stack:
20: iconst_1
StackMap locals:
StackMap stack: int
21: ldc "Unparseable port number: %s"
aload 0
invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;Ljava/lang/Object;)V
22: aload 2
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
istore 4
23: goto 26
StackMap locals:
StackMap stack: java.lang.NumberFormatException
24: pop
25: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Unparseable port number: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
26: StackMap locals:
StackMap stack:
iload 4
invokestatic com.google.common.net.HostAndPort.isValidPort:(I)Z
ldc "Port number out of range: %s"
aload 0
invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;Ljava/lang/Object;)V
27: StackMap locals:
StackMap stack:
new com.google.common.net.HostAndPort
dup
aload 1
iload 4
iload 3
invokespecial com.google.common.net.HostAndPort.<init>:(Ljava/lang/String;IZ)V
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 hostPortString Ljava/lang/String;
6 8 1 host Ljava/lang/String;
11 13 1 host Ljava/lang/String;
14 28 1 host Ljava/lang/String;
2 28 2 portString Ljava/lang/String;
3 28 3 hasBracketlessColons Z
5 7 4 hostAndPort [Ljava/lang/String;
9 17 4 colonPos I
18 28 4 port I
Exception table:
from to target type
22 23 24 Class java.lang.NumberFormatException
MethodParameters:
Name Flags
hostPortString
private static java.lang.String[] getHostAndPortFromBracketedHost(java.lang.String);
descriptor: (Ljava/lang/String;)[Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=5, args_size=1
start local 0 0: iconst_0
istore 1
start local 1 1: iconst_0
istore 2
start local 2 2: aload 0
iconst_0
invokevirtual java.lang.String.charAt:(I)C
bipush 91
if_icmpne 3
iconst_1
goto 4
StackMap locals: int int
StackMap stack:
3: iconst_0
4: StackMap locals:
StackMap stack: int
ldc "Bracketed host-port string must start with a bracket: %s"
5: aload 0
6: invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;Ljava/lang/Object;)V
7: aload 0
bipush 58
invokevirtual java.lang.String.indexOf:(I)I
istore 1
8: aload 0
bipush 93
invokevirtual java.lang.String.lastIndexOf:(I)I
istore 2
9: iload 1
iconst_m1
if_icmple 10
iload 2
iload 1
if_icmple 10
iconst_1
goto 11
StackMap locals:
StackMap stack:
10: iconst_0
11: StackMap locals:
StackMap stack: int
ldc "Invalid bracketed host/port: %s"
12: aload 0
13: invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;Ljava/lang/Object;)V
14: aload 0
iconst_1
iload 2
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 3
start local 3 15: iload 2
iconst_1
iadd
aload 0
invokevirtual java.lang.String.length:()I
if_icmpne 17
16: iconst_2
anewarray java.lang.String
dup
iconst_0
aload 3
aastore
dup
iconst_1
ldc ""
aastore
areturn
17: StackMap locals: java.lang.String
StackMap stack:
aload 0
iload 2
iconst_1
iadd
invokevirtual java.lang.String.charAt:(I)C
bipush 58
if_icmpne 18
iconst_1
goto 19
StackMap locals:
StackMap stack:
18: iconst_0
19: StackMap locals:
StackMap stack: int
ldc "Only a colon may follow a close bracket: %s"
20: aload 0
21: invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;Ljava/lang/Object;)V
22: iload 2
iconst_2
iadd
istore 4
start local 4 23: goto 29
24: StackMap locals: int
StackMap stack:
aload 0
iload 4
invokevirtual java.lang.String.charAt:(I)C
invokestatic java.lang.Character.isDigit:(C)Z
25: ldc "Port must be numeric: %s"
26: aload 0
27: invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;Ljava/lang/Object;)V
28: iinc 4 1
StackMap locals:
StackMap stack:
29: iload 4
aload 0
invokevirtual java.lang.String.length:()I
if_icmplt 24
end local 4 30: iconst_2
anewarray java.lang.String
dup
iconst_0
aload 3
aastore
dup
iconst_1
aload 0
iload 2
iconst_2
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
aastore
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 hostPortString Ljava/lang/String;
1 31 1 colonIndex I
2 31 2 closeBracketIndex I
15 31 3 host Ljava/lang/String;
23 30 4 i I
MethodParameters:
Name Flags
hostPortString
public com.google.common.net.HostAndPort withDefaultPort(int);
descriptor: (I)Lcom/google/common/net/HostAndPort;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: iload 1
invokestatic com.google.common.net.HostAndPort.isValidPort:(I)Z
invokestatic com.google.common.base.Preconditions.checkArgument:(Z)V
1: aload 0
invokevirtual com.google.common.net.HostAndPort.hasPort:()Z
ifeq 3
2: aload 0
areturn
3: StackMap locals:
StackMap stack:
new com.google.common.net.HostAndPort
dup
aload 0
getfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
iload 1
aload 0
getfield com.google.common.net.HostAndPort.hasBracketlessColons:Z
invokespecial com.google.common.net.HostAndPort.<init>:(Ljava/lang/String;IZ)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/google/common/net/HostAndPort;
0 4 1 defaultPort I
MethodParameters:
Name Flags
defaultPort
public com.google.common.net.HostAndPort requireBracketsForIPv6();
descriptor: ()Lcom/google/common/net/HostAndPort;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield com.google.common.net.HostAndPort.hasBracketlessColons:Z
ifeq 1
iconst_0
goto 2
StackMap locals:
StackMap stack:
1: iconst_1
StackMap locals:
StackMap stack: int
2: ldc "Possible bracketless IPv6 literal: %s"
aload 0
getfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
invokestatic com.google.common.base.Preconditions.checkArgument:(ZLjava/lang/String;Ljava/lang/Object;)V
3: aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/google/common/net/HostAndPort;
public boolean equals(java.lang.Object);
descriptor: (Ljava/lang/Object;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
if_acmpne 2
1: iconst_1
ireturn
2: StackMap locals:
StackMap stack:
aload 1
instanceof com.google.common.net.HostAndPort
ifeq 9
3: aload 1
checkcast com.google.common.net.HostAndPort
astore 2
start local 2 4: aload 0
getfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
aload 2
getfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
invokestatic com.google.common.base.Objects.equal:(Ljava/lang/Object;Ljava/lang/Object;)Z
ifeq 8
5: aload 0
getfield com.google.common.net.HostAndPort.port:I
aload 2
getfield com.google.common.net.HostAndPort.port:I
if_icmpne 8
6: aload 0
getfield com.google.common.net.HostAndPort.hasBracketlessColons:Z
aload 2
getfield com.google.common.net.HostAndPort.hasBracketlessColons:Z
if_icmpne 8
7: iconst_1
ireturn
StackMap locals: com.google.common.net.HostAndPort
StackMap stack:
8: iconst_0
ireturn
end local 2 9: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lcom/google/common/net/HostAndPort;
0 10 1 other Ljava/lang/Object;
4 9 2 that Lcom/google/common/net/HostAndPort;
RuntimeVisibleTypeAnnotations:
METHOD_FORMAL_PARAMETER
org.checkerframework.checker.nullness.qual.Nullable()
MethodParameters:
Name Flags
other
public int hashCode();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: iconst_3
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
aastore
dup
iconst_1
aload 0
getfield com.google.common.net.HostAndPort.port:I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_2
aload 0
getfield com.google.common.net.HostAndPort.hasBracketlessColons:Z
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
aastore
invokestatic com.google.common.base.Objects.hashCode:([Ljava/lang/Object;)I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/google/common/net/HostAndPort;
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
aload 0
getfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
invokevirtual java.lang.String.length:()I
bipush 8
iadd
invokespecial java.lang.StringBuilder.<init>:(I)V
astore 1
start local 1 1: aload 0
getfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
bipush 58
invokevirtual java.lang.String.indexOf:(I)I
iflt 4
2: aload 1
bipush 91
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
aload 0
getfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
bipush 93
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
3: goto 5
4: StackMap locals: java.lang.StringBuilder
StackMap stack:
aload 1
aload 0
getfield com.google.common.net.HostAndPort.host:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
5: StackMap locals:
StackMap stack:
aload 0
invokevirtual com.google.common.net.HostAndPort.hasPort:()Z
ifeq 7
6: aload 1
bipush 58
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
aload 0
getfield com.google.common.net.HostAndPort.port:I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
pop
7: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/google/common/net/HostAndPort;
1 8 1 builder Ljava/lang/StringBuilder;
private static boolean isValidPort(int);
descriptor: (I)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: iload 0
iflt 1
iload 0
ldc 65535
if_icmpgt 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 port I
MethodParameters:
Name Flags
port
}
SourceFile: "HostAndPort.java"
RuntimeVisibleAnnotations:
com.google.errorprone.annotations.Immutable()
RuntimeInvisibleAnnotations:
com.google.common.annotations.Beta()
com.google.common.annotations.GwtCompatible()