public class com.mongodb.ServerAddress implements java.io.Serializable
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.mongodb.ServerAddress
super_class: java.lang.Object
{
private static final long serialVersionUID;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 4027873363095395504
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
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokestatic com.mongodb.ServerAddress.defaultHost:()Ljava/lang/String;
invokestatic com.mongodb.ServerAddress.defaultPort:()I
invokespecial com.mongodb.ServerAddress.<init>:(Ljava/lang/String;I)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/ServerAddress;
public void <init>(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic com.mongodb.ServerAddress.defaultPort:()I
invokespecial com.mongodb.ServerAddress.<init>:(Ljava/lang/String;I)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/ServerAddress;
0 2 1 host Ljava/lang/String;
RuntimeVisibleParameterAnnotations:
0:
com.mongodb.lang.Nullable()
MethodParameters:
Name Flags
host final
public void <init>(java.net.InetAddress);
descriptor: (Ljava/net/InetAddress;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual java.net.InetAddress.getHostName:()Ljava/lang/String;
invokestatic com.mongodb.ServerAddress.defaultPort:()I
invokespecial com.mongodb.ServerAddress.<init>:(Ljava/lang/String;I)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/ServerAddress;
0 2 1 inetAddress Ljava/net/InetAddress;
MethodParameters:
Name Flags
inetAddress final
public void <init>(java.net.InetAddress, int);
descriptor: (Ljava/net/InetAddress;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokevirtual java.net.InetAddress.getHostName:()Ljava/lang/String;
iload 2
invokespecial com.mongodb.ServerAddress.<init>:(Ljava/lang/String;I)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/ServerAddress;
0 2 1 inetAddress Ljava/net/InetAddress;
0 2 2 port I
MethodParameters:
Name Flags
inetAddress final
port final
public void <init>(java.net.InetSocketAddress);
descriptor: (Ljava/net/InetSocketAddress;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual java.net.InetSocketAddress.getAddress:()Ljava/net/InetAddress;
aload 1
invokevirtual java.net.InetSocketAddress.getPort:()I
invokespecial com.mongodb.ServerAddress.<init>:(Ljava/net/InetAddress;I)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/ServerAddress;
0 2 1 inetSocketAddress Ljava/net/InetSocketAddress;
MethodParameters:
Name Flags
inetSocketAddress final
public void <init>(java.lang.String, int);
descriptor: (Ljava/lang/String;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=7, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 1
astore 3
start local 3 2: aload 3
ifnonnull 4
3: invokestatic com.mongodb.ServerAddress.defaultHost:()Ljava/lang/String;
astore 3
4: StackMap locals: com.mongodb.ServerAddress java.lang.String int java.lang.String
StackMap stack:
aload 3
invokevirtual java.lang.String.trim:()Ljava/lang/String;
astore 3
5: aload 3
invokevirtual java.lang.String.length:()I
ifne 7
6: invokestatic com.mongodb.ServerAddress.defaultHost:()Ljava/lang/String;
astore 3
7: StackMap locals:
StackMap stack:
iload 2
istore 4
start local 4 8: aload 3
ldc "["
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 19
9: aload 1
ldc "]"
invokevirtual java.lang.String.indexOf:(Ljava/lang/String;)I
istore 5
start local 5 10: iload 5
iconst_m1
if_icmpne 12
11: new java.lang.IllegalArgumentException
dup
ldc "an IPV6 address must be encosed with '[' and ']' according to RFC 2732."
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
12: StackMap locals: int int
StackMap stack:
aload 1
ldc "]:"
invokevirtual java.lang.String.indexOf:(Ljava/lang/String;)I
istore 6
start local 6 13: iload 6
iconst_m1
if_icmpeq 17
14: iload 2
invokestatic com.mongodb.ServerAddress.defaultPort:()I
if_icmpeq 16
15: new java.lang.IllegalArgumentException
dup
ldc "can't specify port in construct and via host"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
16: StackMap locals: int
StackMap stack:
aload 1
iload 6
iconst_2
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
istore 4
17: StackMap locals:
StackMap stack:
aload 1
iconst_1
iload 5
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 3
end local 6 end local 5 18: goto 29
19: StackMap locals:
StackMap stack:
aload 3
ldc ":"
invokevirtual java.lang.String.indexOf:(Ljava/lang/String;)I
istore 5
start local 5 20: aload 3
ldc ":"
invokevirtual java.lang.String.lastIndexOf:(Ljava/lang/String;)I
istore 6
start local 6 21: iload 5
iload 6
if_icmpne 29
iload 5
ifle 29
22: iload 2
invokestatic com.mongodb.ServerAddress.defaultPort:()I
if_icmpeq 24
23: new java.lang.IllegalArgumentException
dup
ldc "can't specify port in construct and via host"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
24: StackMap locals: int int
StackMap stack:
aload 3
iload 5
iconst_1
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
istore 4
25: goto 28
StackMap locals:
StackMap stack: java.lang.NumberFormatException
26: pop
27: new com.mongodb.MongoException
dup
ldc "host and port should be specified in host:port format"
invokespecial com.mongodb.MongoException.<init>:(Ljava/lang/String;)V
athrow
28: StackMap locals:
StackMap stack:
aload 3
iconst_0
iload 5
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
invokevirtual java.lang.String.trim:()Ljava/lang/String;
astore 3
end local 6 end local 5 29: StackMap locals:
StackMap stack:
aload 0
aload 3
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
putfield com.mongodb.ServerAddress.host:Ljava/lang/String;
30: aload 0
iload 4
putfield com.mongodb.ServerAddress.port:I
31: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 32 0 this Lcom/mongodb/ServerAddress;
0 32 1 host Ljava/lang/String;
0 32 2 port I
2 32 3 hostToUse Ljava/lang/String;
8 32 4 portToUse I
10 18 5 idx I
13 18 6 portIdx I
20 29 5 idx I
21 29 6 lastIdx I
Exception table:
from to target type
24 25 26 Class java.lang.NumberFormatException
RuntimeVisibleParameterAnnotations:
0:
com.mongodb.lang.Nullable()
1:
MethodParameters:
Name Flags
host final
port final
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
ifnull 3
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
aload 1
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
if_acmpeq 4
3: StackMap locals:
StackMap stack:
iconst_0
ireturn
4: StackMap locals:
StackMap stack:
aload 1
checkcast com.mongodb.ServerAddress
astore 2
start local 2 5: aload 0
getfield com.mongodb.ServerAddress.port:I
aload 2
getfield com.mongodb.ServerAddress.port:I
if_icmpeq 7
6: iconst_0
ireturn
7: StackMap locals: com.mongodb.ServerAddress
StackMap stack:
aload 0
getfield com.mongodb.ServerAddress.host:Ljava/lang/String;
aload 2
getfield com.mongodb.ServerAddress.host:Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 9
8: iconst_0
ireturn
9: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lcom/mongodb/ServerAddress;
0 10 1 o Ljava/lang/Object;
5 10 2 that Lcom/mongodb/ServerAddress;
MethodParameters:
Name Flags
o final
public int hashCode();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield com.mongodb.ServerAddress.host:Ljava/lang/String;
invokevirtual java.lang.String.hashCode:()I
istore 1
start local 1 1: bipush 31
iload 1
imul
aload 0
getfield com.mongodb.ServerAddress.port:I
iadd
istore 1
2: iload 1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/ServerAddress;
1 3 1 result I
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.mongodb.ServerAddress.host:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/ServerAddress;
public int getPort();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.ServerAddress.port:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/ServerAddress;
public java.net.InetSocketAddress getSocketAddress();
descriptor: ()Ljava/net/InetSocketAddress;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: new java.net.InetSocketAddress
dup
aload 0
getfield com.mongodb.ServerAddress.host:Ljava/lang/String;
invokestatic java.net.InetAddress.getByName:(Ljava/lang/String;)Ljava/net/InetAddress;
aload 0
getfield com.mongodb.ServerAddress.port:I
invokespecial java.net.InetSocketAddress.<init>:(Ljava/net/InetAddress;I)V
1: areturn
2: StackMap locals:
StackMap stack: java.net.UnknownHostException
astore 1
start local 1 3: new com.mongodb.MongoSocketException
dup
aload 1
invokevirtual java.net.UnknownHostException.getMessage:()Ljava/lang/String;
aload 0
aload 1
invokespecial com.mongodb.MongoSocketException.<init>:(Ljava/lang/String;Lcom/mongodb/ServerAddress;Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/ServerAddress;
3 4 1 e Ljava/net/UnknownHostException;
Exception table:
from to target type
0 1 2 Class java.net.UnknownHostException
public java.util.List<java.net.InetSocketAddress> getSocketAddresses();
descriptor: ()Ljava/util/List;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=7, args_size=1
start local 0 0: aload 0
getfield com.mongodb.ServerAddress.host:Ljava/lang/String;
invokestatic java.net.InetAddress.getAllByName:(Ljava/lang/String;)[Ljava/net/InetAddress;
astore 1
start local 1 1: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 2
start local 2 2: aload 1
dup
astore 6
arraylength
istore 5
iconst_0
istore 4
goto 6
StackMap locals: com.mongodb.ServerAddress java.net.InetAddress[] java.util.List top int int java.net.InetAddress[]
StackMap stack:
3: aload 6
iload 4
aaload
astore 3
start local 3 4: aload 2
new java.net.InetSocketAddress
dup
aload 3
aload 0
getfield com.mongodb.ServerAddress.port:I
invokespecial java.net.InetSocketAddress.<init>:(Ljava/net/InetAddress;I)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 3 5: iinc 4 1
StackMap locals:
StackMap stack:
6: iload 4
iload 5
if_icmplt 3
7: aload 2
8: areturn
end local 2 end local 1 9: StackMap locals: com.mongodb.ServerAddress
StackMap stack: java.net.UnknownHostException
astore 1
start local 1 10: new com.mongodb.MongoSocketException
dup
aload 1
invokevirtual java.net.UnknownHostException.getMessage:()Ljava/lang/String;
aload 0
aload 1
invokespecial com.mongodb.MongoSocketException.<init>:(Ljava/lang/String;Lcom/mongodb/ServerAddress;Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/mongodb/ServerAddress;
1 9 1 inetAddresses [Ljava/net/InetAddress;
2 9 2 inetSocketAddressList Ljava/util/List<Ljava/net/InetSocketAddress;>;
4 5 3 inetAddress Ljava/net/InetAddress;
10 11 1 e Ljava/net/UnknownHostException;
Exception table:
from to target type
0 8 9 Class java.net.UnknownHostException
Signature: ()Ljava/util/List<Ljava/net/InetSocketAddress;>;
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
aload 0
getfield com.mongodb.ServerAddress.host:Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ":"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield com.mongodb.ServerAddress.port:I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/ServerAddress;
public static java.lang.String defaultHost();
descriptor: ()Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc "127.0.0.1"
areturn
LocalVariableTable:
Start End Slot Name Signature
public static int defaultPort();
descriptor: ()I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: sipush 27017
ireturn
LocalVariableTable:
Start End Slot Name Signature
public boolean sameHost(java.lang.String);
descriptor: (Ljava/lang/String;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
new com.mongodb.ServerAddress
dup
aload 1
invokespecial com.mongodb.ServerAddress.<init>:(Ljava/lang/String;)V
invokevirtual com.mongodb.ServerAddress.equals:(Ljava/lang/Object;)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/ServerAddress;
0 1 1 hostName Ljava/lang/String;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
hostName final
}
SourceFile: "ServerAddress.java"
RuntimeVisibleAnnotations:
com.mongodb.annotations.Immutable()