public final class org.glassfish.grizzly.utils.ServiceFinder<T> implements java.lang.Iterable<T>
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.glassfish.grizzly.utils.ServiceFinder
super_class: java.lang.Object
{
private static final java.lang.String prefix;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "META-INF/services/"
private final java.lang.Class<T> serviceClass;
descriptor: Ljava/lang/Class;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/Class<TT;>;
private final java.lang.ClassLoader classLoader;
descriptor: Ljava/lang/ClassLoader;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public static <T> org.glassfish.grizzly.utils.ServiceFinder<T> find(java.lang.Class<T>, java.lang.ClassLoader);
descriptor: (Ljava/lang/Class;Ljava/lang/ClassLoader;)Lorg/glassfish/grizzly/utils/ServiceFinder;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: new org.glassfish.grizzly.utils.ServiceFinder
dup
aload 0
aload 1
invokespecial org.glassfish.grizzly.utils.ServiceFinder.<init>:(Ljava/lang/Class;Ljava/lang/ClassLoader;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 service Ljava/lang/Class<TT;>;
0 1 1 loader Ljava/lang/ClassLoader;
Signature: <T:Ljava/lang/Object;>(Ljava/lang/Class<TT;>;Ljava/lang/ClassLoader;)Lorg/glassfish/grizzly/utils/ServiceFinder<TT;>;
MethodParameters:
Name Flags
service
loader
public static <T> org.glassfish.grizzly.utils.ServiceFinder<T> find(java.lang.Class<T>);
descriptor: (Ljava/lang/Class;)Lorg/glassfish/grizzly/utils/ServiceFinder;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual java.lang.Thread.getContextClassLoader:()Ljava/lang/ClassLoader;
invokestatic org.glassfish.grizzly.utils.ServiceFinder.find:(Ljava/lang/Class;Ljava/lang/ClassLoader;)Lorg/glassfish/grizzly/utils/ServiceFinder;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 service Ljava/lang/Class<TT;>;
Signature: <T:Ljava/lang/Object;>(Ljava/lang/Class<TT;>;)Lorg/glassfish/grizzly/utils/ServiceFinder<TT;>;
MethodParameters:
Name Flags
service
private void <init>(java.lang.Class<T>, java.lang.ClassLoader);
descriptor: (Ljava/lang/Class;Ljava/lang/ClassLoader;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield org.glassfish.grizzly.utils.ServiceFinder.serviceClass:Ljava/lang/Class;
2: aload 0
aload 2
putfield org.glassfish.grizzly.utils.ServiceFinder.classLoader:Ljava/lang/ClassLoader;
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/glassfish/grizzly/utils/ServiceFinder<TT;>;
0 4 1 service Ljava/lang/Class<TT;>;
0 4 2 loader Ljava/lang/ClassLoader;
Signature: (Ljava/lang/Class<TT;>;Ljava/lang/ClassLoader;)V
MethodParameters:
Name Flags
service
loader
public java.util.Iterator<T> iterator();
descriptor: ()Ljava/util/Iterator;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: new org.glassfish.grizzly.utils.ServiceFinder$LazyIterator
dup
aload 0
getfield org.glassfish.grizzly.utils.ServiceFinder.serviceClass:Ljava/lang/Class;
aload 0
getfield org.glassfish.grizzly.utils.ServiceFinder.classLoader:Ljava/lang/ClassLoader;
invokespecial org.glassfish.grizzly.utils.ServiceFinder$LazyIterator.<init>:(Ljava/lang/Class;Ljava/lang/ClassLoader;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/utils/ServiceFinder<TT;>;
Signature: ()Ljava/util/Iterator<TT;>;
public T[] toArray();
descriptor: ()[Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 1
start local 1 1: aload 0
invokevirtual org.glassfish.grizzly.utils.ServiceFinder.iterator:()Ljava/util/Iterator;
astore 3
goto 4
StackMap locals: org.glassfish.grizzly.utils.ServiceFinder java.util.List top java.util.Iterator
StackMap stack:
2: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.Object
astore 2
start local 2 3: aload 1
aload 2
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 2 4: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
5: aload 1
aload 0
getfield org.glassfish.grizzly.utils.ServiceFinder.serviceClass:Ljava/lang/Class;
aload 1
invokeinterface java.util.List.size:()I
invokestatic java.lang.reflect.Array.newInstance:(Ljava/lang/Class;I)Ljava/lang/Object;
checkcast java.lang.Object[]
invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/glassfish/grizzly/utils/ServiceFinder<TT;>;
1 6 1 result Ljava/util/List<TT;>;
3 4 2 t TT;
Signature: ()[TT;
private static void fail(java.lang.Class, java.lang.String, java.lang.Throwable);
descriptor: (Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Throwable;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: new org.glassfish.grizzly.utils.ServiceConfigurationError
dup
new java.lang.StringBuilder
dup
aload 0
invokevirtual java.lang.Class.getName:()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 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial org.glassfish.grizzly.utils.ServiceConfigurationError.<init>:(Ljava/lang/String;)V
astore 3
start local 3 1: aload 3
aload 2
invokevirtual org.glassfish.grizzly.utils.ServiceConfigurationError.initCause:(Ljava/lang/Throwable;)Ljava/lang/Throwable;
pop
2: aload 3
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 service Ljava/lang/Class;
0 3 1 msg Ljava/lang/String;
0 3 2 cause Ljava/lang/Throwable;
1 3 3 sce Lorg/glassfish/grizzly/utils/ServiceConfigurationError;
Exceptions:
throws org.glassfish.grizzly.utils.ServiceConfigurationError
MethodParameters:
Name Flags
service
msg
cause
private static void fail(java.lang.Class, java.lang.String);
descriptor: (Ljava/lang/Class;Ljava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: new org.glassfish.grizzly.utils.ServiceConfigurationError
dup
new java.lang.StringBuilder
dup
aload 0
invokevirtual java.lang.Class.getName:()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 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial org.glassfish.grizzly.utils.ServiceConfigurationError.<init>:(Ljava/lang/String;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 service Ljava/lang/Class;
0 1 1 msg Ljava/lang/String;
Exceptions:
throws org.glassfish.grizzly.utils.ServiceConfigurationError
MethodParameters:
Name Flags
service
msg
private static void fail(java.lang.Class, java.net.URL, int, java.lang.String);
descriptor: (Ljava/lang/Class;Ljava/net/URL;ILjava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc ":"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
iload 2
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc ": "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic org.glassfish.grizzly.utils.ServiceFinder.fail:(Ljava/lang/Class;Ljava/lang/String;)V
1: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 service Ljava/lang/Class;
0 2 1 u Ljava/net/URL;
0 2 2 line I
0 2 3 msg Ljava/lang/String;
Exceptions:
throws org.glassfish.grizzly.utils.ServiceConfigurationError
MethodParameters:
Name Flags
service
u
line
msg
private static int parseLine(java.lang.Class, java.net.URL, java.io.BufferedReader, int, java.util.List<java.lang.String>, java.util.Set<java.lang.String>);
descriptor: (Ljava/lang/Class;Ljava/net/URL;Ljava/io/BufferedReader;ILjava/util/List;Ljava/util/Set;)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=11, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 2
invokevirtual java.io.BufferedReader.readLine:()Ljava/lang/String;
astore 6
start local 6 1: aload 6
ifnonnull 3
2: iconst_m1
ireturn
3: StackMap locals: java.lang.String
StackMap stack:
aload 6
bipush 35
invokevirtual java.lang.String.indexOf:(I)I
istore 7
start local 7 4: iload 7
iflt 6
5: aload 6
iconst_0
iload 7
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
astore 6
6: StackMap locals: int
StackMap stack:
aload 6
invokevirtual java.lang.String.trim:()Ljava/lang/String;
astore 6
7: aload 6
invokevirtual java.lang.String.length:()I
istore 8
start local 8 8: iload 8
ifeq 24
9: aload 6
bipush 32
invokevirtual java.lang.String.indexOf:(I)I
ifge 10
aload 6
bipush 9
invokevirtual java.lang.String.indexOf:(I)I
iflt 11
10: StackMap locals: int
StackMap stack:
aload 0
aload 1
iload 3
ldc "Illegal configuration-file syntax"
invokestatic org.glassfish.grizzly.utils.ServiceFinder.fail:(Ljava/lang/Class;Ljava/net/URL;ILjava/lang/String;)V
11: StackMap locals:
StackMap stack:
aload 6
iconst_0
invokevirtual java.lang.String.codePointAt:(I)I
istore 9
start local 9 12: iload 9
invokestatic java.lang.Character.isJavaIdentifierStart:(I)Z
ifne 14
13: aload 0
aload 1
iload 3
new java.lang.StringBuilder
dup
ldc "Illegal provider-class name: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 6
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic org.glassfish.grizzly.utils.ServiceFinder.fail:(Ljava/lang/Class;Ljava/net/URL;ILjava/lang/String;)V
14: StackMap locals: int
StackMap stack:
iload 9
invokestatic java.lang.Character.charCount:(I)I
istore 10
start local 10 15: goto 20
16: StackMap locals: int
StackMap stack:
aload 6
iload 10
invokevirtual java.lang.String.codePointAt:(I)I
istore 9
17: iload 9
invokestatic java.lang.Character.isJavaIdentifierPart:(I)Z
ifne 19
iload 9
bipush 46
if_icmpeq 19
18: aload 0
aload 1
iload 3
new java.lang.StringBuilder
dup
ldc "Illegal provider-class name: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 6
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic org.glassfish.grizzly.utils.ServiceFinder.fail:(Ljava/lang/Class;Ljava/net/URL;ILjava/lang/String;)V
19: StackMap locals:
StackMap stack:
iload 10
iload 9
invokestatic java.lang.Character.charCount:(I)I
iadd
istore 10
StackMap locals:
StackMap stack:
20: iload 10
iload 8
if_icmplt 16
end local 10 21: aload 5
aload 6
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifne 24
22: aload 4
aload 6
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
23: aload 5
aload 6
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
end local 9 24: StackMap locals:
StackMap stack:
iload 3
iconst_1
iadd
ireturn
end local 8 end local 7 end local 6 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 25 0 service Ljava/lang/Class;
0 25 1 u Ljava/net/URL;
0 25 2 r Ljava/io/BufferedReader;
0 25 3 lc I
0 25 4 names Ljava/util/List<Ljava/lang/String;>;
0 25 5 returned Ljava/util/Set<Ljava/lang/String;>;
1 25 6 ln Ljava/lang/String;
4 25 7 ci I
8 25 8 n I
12 24 9 cp I
15 21 10 i I
Exceptions:
throws java.io.IOException, org.glassfish.grizzly.utils.ServiceConfigurationError
Signature: (Ljava/lang/Class;Ljava/net/URL;Ljava/io/BufferedReader;ILjava/util/List<Ljava/lang/String;>;Ljava/util/Set<Ljava/lang/String;>;)I
MethodParameters:
Name Flags
service
u
r
lc
names
returned
private static java.util.Iterator<java.lang.String> parse(java.lang.Class, java.net.URL, java.util.Set<java.lang.String>);
descriptor: (Ljava/lang/Class;Ljava/net/URL;Ljava/util/Set;)Ljava/util/Iterator;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=9, args_size=3
start local 0 start local 1 start local 2 0: aconst_null
astore 3
start local 3 1: aconst_null
astore 4
start local 4 2: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 5
start local 5 3: aload 1
invokevirtual java.net.URL.openStream:()Ljava/io/InputStream;
astore 3
4: new java.io.BufferedReader
dup
new java.io.InputStreamReader
dup
aload 3
ldc "utf-8"
invokespecial java.io.InputStreamReader.<init>:(Ljava/io/InputStream;Ljava/lang/String;)V
invokespecial java.io.BufferedReader.<init>:(Ljava/io/Reader;)V
astore 4
5: iconst_1
istore 6
start local 6 6: StackMap locals: java.lang.Class java.net.URL java.util.Set java.io.InputStream java.io.BufferedReader java.util.ArrayList int
StackMap stack:
aload 0
aload 1
aload 4
iload 6
aload 5
aload 2
invokestatic org.glassfish.grizzly.utils.ServiceFinder.parseLine:(Ljava/lang/Class;Ljava/net/URL;Ljava/io/BufferedReader;ILjava/util/List;Ljava/util/Set;)I
dup
istore 6
ifge 6
end local 6 7: goto 27
StackMap locals: java.lang.Class java.net.URL java.util.Set java.io.InputStream java.io.BufferedReader java.util.ArrayList
StackMap stack: java.io.IOException
8: astore 6
start local 6 9: aload 0
new java.lang.StringBuilder
dup
ldc ": "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 6
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic org.glassfish.grizzly.utils.ServiceFinder.fail:(Ljava/lang/Class;Ljava/lang/String;)V
end local 6 10: aload 4
ifnull 12
11: aload 4
invokevirtual java.io.BufferedReader.close:()V
12: StackMap locals:
StackMap stack:
aload 3
ifnull 34
13: aload 3
invokevirtual java.io.InputStream.close:()V
14: goto 34
StackMap locals:
StackMap stack: java.io.IOException
15: astore 8
start local 8 16: aload 0
new java.lang.StringBuilder
dup
ldc ": "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 8
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic org.glassfish.grizzly.utils.ServiceFinder.fail:(Ljava/lang/Class;Ljava/lang/String;)V
end local 8 17: goto 34
18: StackMap locals:
StackMap stack: java.lang.Throwable
astore 7
19: aload 4
ifnull 21
20: aload 4
invokevirtual java.io.BufferedReader.close:()V
21: StackMap locals: java.lang.Class java.net.URL java.util.Set java.io.InputStream java.io.BufferedReader java.util.ArrayList top java.lang.Throwable
StackMap stack:
aload 3
ifnull 26
22: aload 3
invokevirtual java.io.InputStream.close:()V
23: goto 26
StackMap locals:
StackMap stack: java.io.IOException
24: astore 8
start local 8 25: aload 0
new java.lang.StringBuilder
dup
ldc ": "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 8
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic org.glassfish.grizzly.utils.ServiceFinder.fail:(Ljava/lang/Class;Ljava/lang/String;)V
end local 8 26: StackMap locals:
StackMap stack:
aload 7
athrow
27: StackMap locals: java.lang.Class java.net.URL java.util.Set java.io.InputStream java.io.BufferedReader java.util.ArrayList
StackMap stack:
aload 4
ifnull 29
28: aload 4
invokevirtual java.io.BufferedReader.close:()V
29: StackMap locals:
StackMap stack:
aload 3
ifnull 34
30: aload 3
invokevirtual java.io.InputStream.close:()V
31: goto 34
StackMap locals:
StackMap stack: java.io.IOException
32: astore 8
start local 8 33: aload 0
new java.lang.StringBuilder
dup
ldc ": "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 8
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic org.glassfish.grizzly.utils.ServiceFinder.fail:(Ljava/lang/Class;Ljava/lang/String;)V
end local 8 34: StackMap locals:
StackMap stack:
aload 5
invokevirtual java.util.ArrayList.iterator:()Ljava/util/Iterator;
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 35 0 service Ljava/lang/Class;
0 35 1 u Ljava/net/URL;
0 35 2 returned Ljava/util/Set<Ljava/lang/String;>;
1 35 3 in Ljava/io/InputStream;
2 35 4 r Ljava/io/BufferedReader;
3 35 5 names Ljava/util/ArrayList<Ljava/lang/String;>;
6 7 6 lc I
9 10 6 x Ljava/io/IOException;
16 17 8 y Ljava/io/IOException;
25 26 8 y Ljava/io/IOException;
33 34 8 y Ljava/io/IOException;
Exception table:
from to target type
3 7 8 Class java.io.IOException
10 14 15 Class java.io.IOException
3 10 18 any
19 23 24 Class java.io.IOException
27 31 32 Class java.io.IOException
Exceptions:
throws org.glassfish.grizzly.utils.ServiceConfigurationError
Signature: (Ljava/lang/Class;Ljava/net/URL;Ljava/util/Set<Ljava/lang/String;>;)Ljava/util/Iterator<Ljava/lang/String;>;
MethodParameters:
Name Flags
service
u
returned
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;Ljava/lang/Iterable<TT;>;
SourceFile: "ServiceFinder.java"
NestMembers:
org.glassfish.grizzly.utils.ServiceFinder$LazyIterator
InnerClasses:
private LazyIterator = org.glassfish.grizzly.utils.ServiceFinder$LazyIterator of org.glassfish.grizzly.utils.ServiceFinder