class com.sun.jndi.ldap.ServiceLocator
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: com.sun.jndi.ldap.ServiceLocator
super_class: java.lang.Object
{
private static final java.lang.String SRV_RR;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "SRV"
private static final java.lang.String[] SRV_RR_ATTR;
descriptor: [Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.Random random;
descriptor: Ljava/util/Random;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: iconst_1
anewarray java.lang.String
dup
iconst_0
ldc "SRV"
aastore
putstatic com.sun.jndi.ldap.ServiceLocator.SRV_RR_ATTR:[Ljava/lang/String;
1: new java.util.Random
dup
invokespecial java.util.Random.<init>:()V
putstatic com.sun.jndi.ldap.ServiceLocator.random:Ljava/util/Random;
return
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/sun/jndi/ldap/ServiceLocator;
static java.lang.String mapDnToDomainName(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=7, args_size=1
start local 0 0: aload 0
ifnonnull 2
1: aconst_null
areturn
2: StackMap locals:
StackMap stack:
new java.lang.StringBuffer
dup
invokespecial java.lang.StringBuffer.<init>:()V
astore 1
start local 1 3: new javax.naming.ldap.LdapName
dup
aload 0
invokespecial javax.naming.ldap.LdapName.<init>:(Ljava/lang/String;)V
astore 2
start local 2 4: aload 2
invokevirtual javax.naming.ldap.LdapName.getRdns:()Ljava/util/List;
astore 3
start local 3 5: aload 3
invokeinterface java.util.List.size:()I
iconst_1
isub
istore 4
start local 4 6: goto 23
7: StackMap locals: java.lang.String java.lang.StringBuffer javax.naming.ldap.LdapName java.util.List int
StackMap stack:
aload 3
iload 4
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast javax.naming.ldap.Rdn
astore 5
start local 5 8: aload 5
invokevirtual javax.naming.ldap.Rdn.size:()I
iconst_1
if_icmpne 21
9: ldc "dc"
aload 5
invokevirtual javax.naming.ldap.Rdn.getType:()Ljava/lang/String;
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 21
10: aload 5
invokevirtual javax.naming.ldap.Rdn.getValue:()Ljava/lang/Object;
astore 6
start local 6 11: aload 6
instanceof java.lang.String
ifeq 19
12: aload 6
ldc "."
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifne 14
13: aload 1
invokevirtual java.lang.StringBuffer.length:()I
iconst_1
if_icmpne 15
aload 1
iconst_0
invokevirtual java.lang.StringBuffer.charAt:(I)C
bipush 46
if_icmpne 15
14: StackMap locals: javax.naming.ldap.Rdn java.lang.Object
StackMap stack:
aload 1
iconst_0
invokevirtual java.lang.StringBuffer.setLength:(I)V
15: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.lang.StringBuffer.length:()I
ifle 17
16: aload 1
bipush 46
invokevirtual java.lang.StringBuffer.append:(C)Ljava/lang/StringBuffer;
pop
17: StackMap locals:
StackMap stack:
aload 1
aload 6
invokevirtual java.lang.StringBuffer.append:(Ljava/lang/Object;)Ljava/lang/StringBuffer;
pop
18: goto 22
19: StackMap locals:
StackMap stack:
aload 1
iconst_0
invokevirtual java.lang.StringBuffer.setLength:(I)V
end local 6 20: goto 22
21: StackMap locals:
StackMap stack:
aload 1
iconst_0
invokevirtual java.lang.StringBuffer.setLength:(I)V
end local 5 22: StackMap locals:
StackMap stack:
iinc 4 -1
StackMap locals:
StackMap stack:
23: iload 4
ifge 7
end local 4 24: aload 1
invokevirtual java.lang.StringBuffer.length:()I
ifeq 25
aload 1
invokevirtual java.lang.StringBuffer.toString:()Ljava/lang/String;
goto 26
StackMap locals:
StackMap stack:
25: aconst_null
StackMap locals:
StackMap stack: java.lang.String
26: areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 27 0 dn Ljava/lang/String;
3 27 1 domain Ljava/lang/StringBuffer;
4 27 2 ldapName Ljavax/naming/ldap/LdapName;
5 27 3 rdnList Ljava/util/List<Ljavax/naming/ldap/Rdn;>;
6 24 4 i I
8 22 5 rdn Ljavax/naming/ldap/Rdn;
11 20 6 attrval Ljava/lang/Object;
Exceptions:
throws javax.naming.InvalidNameException
MethodParameters:
Name Flags
dn
static java.lang.String[] getLdapService(java.lang.String, java.util.Hashtable<?, ?>);
descriptor: (Ljava/lang/String;Ljava/util/Hashtable;)[Ljava/lang/String;
flags: (0x0008) ACC_STATIC
Code:
stack=6, locals=13, args_size=2
start local 0 start local 1 0: aload 0
ifnull 1
aload 0
invokevirtual java.lang.String.length:()I
ifne 2
1: StackMap locals:
StackMap stack:
aconst_null
areturn
2: StackMap locals:
StackMap stack:
new java.lang.StringBuilder
dup
ldc "dns:///_ldap._tcp."
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;
astore 2
start local 2 3: aconst_null
astore 3
start local 3 4: ldc "dns"
aload 1
invokestatic javax.naming.spi.NamingManager.getURLContext:(Ljava/lang/String;Ljava/util/Hashtable;)Ljavax/naming/Context;
astore 4
start local 4 5: aload 4
instanceof javax.naming.directory.DirContext
ifne 7
6: aconst_null
areturn
7: StackMap locals: java.lang.String java.lang.String[] javax.naming.Context
StackMap stack:
aload 4
checkcast javax.naming.directory.DirContext
aload 2
getstatic com.sun.jndi.ldap.ServiceLocator.SRV_RR_ATTR:[Ljava/lang/String;
invokeinterface javax.naming.directory.DirContext.getAttributes:(Ljava/lang/String;[Ljava/lang/String;)Ljavax/naming/directory/Attributes;
8: astore 5
start local 5 9: aload 5
ifnull 33
aload 5
ldc "SRV"
invokeinterface javax.naming.directory.Attributes.get:(Ljava/lang/String;)Ljavax/naming/directory/Attribute;
dup
astore 6
start local 6 10: ifnull 33
11: aload 6
invokeinterface javax.naming.directory.Attribute.size:()I
istore 7
start local 7 12: iconst_0
istore 8
start local 8 13: iload 7
anewarray com.sun.jndi.ldap.ServiceLocator$SrvRecord
astore 9
start local 9 14: iconst_0
istore 10
start local 10 15: iconst_0
istore 11
start local 11 16: goto 22
17: StackMap locals: java.lang.String java.util.Hashtable java.lang.String java.lang.String[] javax.naming.Context javax.naming.directory.Attributes javax.naming.directory.Attribute int int com.sun.jndi.ldap.ServiceLocator$SrvRecord[] int int
StackMap stack:
aload 9
iload 11
new com.sun.jndi.ldap.ServiceLocator$SrvRecord
dup
aload 6
iload 10
invokeinterface javax.naming.directory.Attribute.get:(I)Ljava/lang/Object;
checkcast java.lang.String
invokespecial com.sun.jndi.ldap.ServiceLocator$SrvRecord.<init>:(Ljava/lang/String;)V
aastore
18: iinc 11 1
19: goto 21
StackMap locals:
StackMap stack: java.lang.Exception
20: pop
21: StackMap locals:
StackMap stack:
iinc 10 1
22: StackMap locals:
StackMap stack:
iload 10
iload 7
if_icmplt 17
23: iload 11
istore 8
24: iload 8
iload 7
if_icmpge 28
25: iload 8
anewarray com.sun.jndi.ldap.ServiceLocator$SrvRecord
astore 12
start local 12 26: aload 9
iconst_0
aload 12
iconst_0
iload 8
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
27: aload 12
astore 9
end local 12 28: StackMap locals:
StackMap stack:
iload 8
iconst_1
if_icmple 30
29: aload 9
invokestatic java.util.Arrays.sort:([Ljava/lang/Object;)V
30: StackMap locals:
StackMap stack:
aload 9
invokestatic com.sun.jndi.ldap.ServiceLocator.extractHostports:([Lcom/sun/jndi/ldap/ServiceLocator$SrvRecord;)[Ljava/lang/String;
astore 3
end local 11 end local 10 end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 31: goto 33
StackMap locals: java.lang.String java.util.Hashtable java.lang.String java.lang.String[]
StackMap stack: javax.naming.NamingException
32: pop
33: StackMap locals:
StackMap stack:
aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 34 0 domainName Ljava/lang/String;
0 34 1 environment Ljava/util/Hashtable<**>;
3 34 2 dnsUrl Ljava/lang/String;
4 34 3 hostports [Ljava/lang/String;
5 31 4 ctx Ljavax/naming/Context;
9 31 5 attrs Ljavax/naming/directory/Attributes;
10 31 6 attr Ljavax/naming/directory/Attribute;
12 31 7 numValues I
13 31 8 numRecords I
14 31 9 srvRecords [Lcom/sun/jndi/ldap/ServiceLocator$SrvRecord;
15 31 10 i I
16 31 11 j I
26 28 12 trimmed [Lcom/sun/jndi/ldap/ServiceLocator$SrvRecord;
Exception table:
from to target type
17 19 20 Class java.lang.Exception
4 6 32 Class javax.naming.NamingException
7 31 32 Class javax.naming.NamingException
Signature: (Ljava/lang/String;Ljava/util/Hashtable<**>;)[Ljava/lang/String;
MethodParameters:
Name Flags
domainName
environment
private static java.lang.String[] (com.sun.jndi.ldap.ServiceLocator$SrvRecord[]);
descriptor: ([Lcom/sun/jndi/ldap/ServiceLocator$SrvRecord;)[Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=8, args_size=1
start local 0 0: aconst_null
astore 1
start local 1 1: iconst_0
istore 2
start local 2 2: iconst_0
istore 3
start local 3 3: iconst_0
istore 4
start local 4 4: iconst_0
istore 5
start local 5 5: iconst_0
istore 6
start local 6 6: goto 22
7: StackMap locals: com.sun.jndi.ldap.ServiceLocator$SrvRecord[] java.lang.String[] int int int int int
StackMap stack:
aload 1
ifnonnull 9
8: aload 0
arraylength
anewarray java.lang.String
astore 1
9: StackMap locals:
StackMap stack:
iload 6
istore 2
10: goto 12
11: StackMap locals:
StackMap stack:
iinc 6 1
12: StackMap locals:
StackMap stack:
iload 6
aload 0
arraylength
iconst_1
isub
if_icmpge 14
13: aload 0
iload 6
aaload
getfield com.sun.jndi.ldap.ServiceLocator$SrvRecord.priority:I
aload 0
iload 6
iconst_1
iadd
aaload
getfield com.sun.jndi.ldap.ServiceLocator$SrvRecord.priority:I
if_icmpeq 11
14: StackMap locals:
StackMap stack:
iload 6
istore 3
15: iload 3
iload 2
isub
iconst_1
iadd
istore 4
16: iconst_0
istore 7
start local 7 17: goto 20
18: StackMap locals: int
StackMap stack:
aload 1
iload 5
iinc 5 1
aload 0
iload 2
iload 3
invokestatic com.sun.jndi.ldap.ServiceLocator.selectHostport:([Lcom/sun/jndi/ldap/ServiceLocator$SrvRecord;II)Ljava/lang/String;
aastore
19: iinc 7 1
StackMap locals:
StackMap stack:
20: iload 7
iload 4
if_icmplt 18
end local 7 21: iinc 6 1
StackMap locals:
StackMap stack:
22: iload 6
aload 0
arraylength
if_icmplt 7
end local 6 23: aload 1
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 srvRecords [Lcom/sun/jndi/ldap/ServiceLocator$SrvRecord;
1 24 1 hostports [Ljava/lang/String;
2 24 2 head I
3 24 3 tail I
4 24 4 sublistLength I
5 24 5 k I
6 23 6 i I
17 21 7 j I
MethodParameters:
Name Flags
srvRecords
private static java.lang.String selectHostport(com.sun.jndi.ldap.ServiceLocator$SrvRecord[], int, int);
descriptor: ([Lcom/sun/jndi/ldap/ServiceLocator$SrvRecord;II)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=7, args_size=3
start local 0 start local 1 start local 2 0: iload 1
iload 2
if_icmpne 2
1: aload 0
iload 1
aaload
getfield com.sun.jndi.ldap.ServiceLocator$SrvRecord.hostport:Ljava/lang/String;
areturn
2: StackMap locals:
StackMap stack:
iconst_0
istore 3
start local 3 3: iload 1
istore 4
start local 4 4: goto 9
5: StackMap locals: int int
StackMap stack:
aload 0
iload 4
aaload
ifnull 8
6: iload 3
aload 0
iload 4
aaload
getfield com.sun.jndi.ldap.ServiceLocator$SrvRecord.weight:I
iadd
istore 3
7: aload 0
iload 4
aaload
iload 3
putfield com.sun.jndi.ldap.ServiceLocator$SrvRecord.sum:I
8: StackMap locals:
StackMap stack:
iinc 4 1
StackMap locals:
StackMap stack:
9: iload 4
iload 2
if_icmple 5
end local 4 10: aconst_null
astore 4
start local 4 11: iload 3
ifne 12
iconst_0
goto 13
StackMap locals: com.sun.jndi.ldap.ServiceLocator$SrvRecord[] int int int java.lang.String
StackMap stack:
12: getstatic com.sun.jndi.ldap.ServiceLocator.random:Ljava/util/Random;
iload 3
iconst_1
iadd
invokevirtual java.util.Random.nextInt:(I)I
StackMap locals:
StackMap stack: int
13: istore 5
start local 5 14: iload 1
istore 6
start local 6 15: goto 21
16: StackMap locals: int int
StackMap stack:
aload 0
iload 6
aaload
ifnull 20
aload 0
iload 6
aaload
getfield com.sun.jndi.ldap.ServiceLocator$SrvRecord.sum:I
iload 5
if_icmplt 20
17: aload 0
iload 6
aaload
getfield com.sun.jndi.ldap.ServiceLocator$SrvRecord.hostport:Ljava/lang/String;
astore 4
18: aload 0
iload 6
aconst_null
aastore
19: goto 22
20: StackMap locals:
StackMap stack:
iinc 6 1
StackMap locals:
StackMap stack:
21: iload 6
iload 2
if_icmple 16
end local 6 22: StackMap locals:
StackMap stack:
aload 4
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 srvRecords [Lcom/sun/jndi/ldap/ServiceLocator$SrvRecord;
0 23 1 head I
0 23 2 tail I
3 23 3 sum I
4 10 4 i I
11 23 4 hostport Ljava/lang/String;
14 23 5 target I
15 22 6 i I
MethodParameters:
Name Flags
srvRecords
head
tail
}
SourceFile: "ServiceLocator.java"
NestMembers:
com.sun.jndi.ldap.ServiceLocator$SrvRecord
InnerClasses:
SrvRecord = com.sun.jndi.ldap.ServiceLocator$SrvRecord of com.sun.jndi.ldap.ServiceLocator