class org.jruby.embed.jsr223.ServiceFinder<T>
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: org.jruby.embed.jsr223.ServiceFinder
super_class: java.lang.Object
{
private final java.util.Set<T> services;
descriptor: Ljava/util/Set;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Set<TT;>;
void <init>(java.lang.String, java.lang.ClassLoader);
descriptor: (Ljava/lang/String;Ljava/lang/ClassLoader;)V
flags: (0x0000)
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 2
ifnonnull 5
2: invokestatic java.lang.ClassLoader.getSystemClassLoader:()Ljava/lang/ClassLoader;
astore 2
3: aload 1
invokestatic java.lang.ClassLoader.getSystemResources:(Ljava/lang/String;)Ljava/util/Enumeration;
astore 3
start local 3 4: goto 6
end local 3 5: StackMap locals: org.jruby.embed.jsr223.ServiceFinder java.lang.String java.lang.ClassLoader
StackMap stack:
aload 2
aload 1
invokevirtual java.lang.ClassLoader.getResources:(Ljava/lang/String;)Ljava/util/Enumeration;
astore 3
start local 3 6: StackMap locals: java.util.Enumeration
StackMap stack:
aload 3
invokestatic org.jruby.embed.jsr223.ServiceFinder.readClassNames:(Ljava/util/Enumeration;)Ljava/util/List;
astore 4
start local 4 7: aload 0
aload 0
aload 4
aload 2
invokevirtual org.jruby.embed.jsr223.ServiceFinder.instantiateClasses:(Ljava/util/Collection;Ljava/lang/ClassLoader;)Ljava/util/Set;
putfield org.jruby.embed.jsr223.ServiceFinder.services:Ljava/util/Set;
8: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/embed/jsr223/ServiceFinder<TT;>;
0 9 1 serviceName Ljava/lang/String;
0 9 2 loader Ljava/lang/ClassLoader;
4 5 3 urls Ljava/util/Enumeration<Ljava/net/URL;>;
6 9 3 urls Ljava/util/Enumeration<Ljava/net/URL;>;
7 9 4 classNames Ljava/util/List<Ljava/lang/String;>;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
serviceName final
loader
java.util.Collection<T> getServices();
descriptor: ()Ljava/util/Collection;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.embed.jsr223.ServiceFinder.services:Ljava/util/Set;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/embed/jsr223/ServiceFinder<TT;>;
Signature: ()Ljava/util/Collection<TT;>;
private static java.util.List<java.lang.String> readClassNames(java.util.Enumeration<java.net.URL>);
descriptor: (Ljava/util/Enumeration;)Ljava/util/List;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=6, args_size=1
start local 0 0: ldc "file.encoding"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 1
start local 1 1: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 2
start local 2 2: goto 15
3: StackMap locals: java.lang.String java.util.ArrayList
StackMap stack:
aconst_null
astore 3
start local 3 4: aload 0
invokeinterface java.util.Enumeration.nextElement:()Ljava/lang/Object;
checkcast java.net.URL
astore 3
5: new java.io.BufferedReader
dup
new java.io.InputStreamReader
dup
aload 3
invokevirtual java.net.URL.openStream:()Ljava/io/InputStream;
aload 1
invokespecial java.io.InputStreamReader.<init>:(Ljava/io/InputStream;Ljava/lang/String;)V
invokespecial java.io.BufferedReader.<init>:(Ljava/io/Reader;)V
6: astore 4
start local 4 7: goto 10
start local 5 8: StackMap locals: java.net.URL java.io.BufferedReader java.lang.String
StackMap stack:
aload 5
invokestatic org.jruby.embed.jsr223.ServiceFinder.deleteComments:(Ljava/lang/String;)Ljava/lang/String;
dup
astore 5
ifnull 10
9: aload 2
aload 5
invokevirtual java.util.ArrayList.add:(Ljava/lang/Object;)Z
pop
end local 5 10: StackMap locals:
StackMap stack:
aload 4
invokevirtual java.io.BufferedReader.readLine:()Ljava/lang/String;
dup
astore 5
start local 5 11: ifnonnull 8
end local 5 end local 4 12: goto 15
13: StackMap locals: java.util.Enumeration java.lang.String java.util.ArrayList java.net.URL
StackMap stack: java.io.IOException
pop
14: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Failed to get a class name from "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
end local 3 15: StackMap locals:
StackMap stack:
aload 0
invokeinterface java.util.Enumeration.hasMoreElements:()Z
ifne 3
16: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 urls Ljava/util/Enumeration<Ljava/net/URL;>;
1 17 1 encoding Ljava/lang/String;
2 17 2 names Ljava/util/ArrayList<Ljava/lang/String;>;
4 15 3 url Ljava/net/URL;
7 12 4 reader Ljava/io/BufferedReader;
8 10 5 line Ljava/lang/String;
11 12 5 line Ljava/lang/String;
Exception table:
from to target type
4 12 13 Class java.io.IOException
Signature: (Ljava/util/Enumeration<Ljava/net/URL;>;)Ljava/util/List<Ljava/lang/String;>;
MethodParameters:
Name Flags
urls
private static java.lang.String (java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
ldc "#"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 1
aconst_null
areturn
1: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.String.length:()I
iconst_1
if_icmpge 2
aconst_null
areturn
2: StackMap locals:
StackMap stack:
new java.util.StringTokenizer
dup
aload 0
ldc "#"
invokespecial java.util.StringTokenizer.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 3: aload 1
invokevirtual java.util.StringTokenizer.nextElement:()Ljava/lang/Object;
checkcast java.lang.String
invokevirtual java.lang.String.trim:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 line Ljava/lang/String;
3 4 1 st Ljava/util/StringTokenizer;
MethodParameters:
Name Flags
line final
private java.util.Set<T> instantiateClasses(java.util.Collection<java.lang.String>, java.lang.ClassLoader);
descriptor: (Ljava/util/Collection;Ljava/lang/ClassLoader;)Ljava/util/Set;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=7, args_size=3
start local 0 start local 1 start local 2 0: new java.util.HashSet
dup
aload 1
invokeinterface java.util.Collection.size:()I
invokespecial java.util.HashSet.<init>:(I)V
astore 3
start local 3 1: aload 1
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 5
goto 17
StackMap locals: org.jruby.embed.jsr223.ServiceFinder java.util.Collection java.lang.ClassLoader java.util.HashSet top java.util.Iterator
StackMap stack:
2: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 4
start local 4 3: aload 4
iconst_1
aload 2
invokestatic java.lang.Class.forName:(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;
astore 6
start local 6 4: aload 3
aload 6
invokevirtual java.lang.Class.newInstance:()Ljava/lang/Object;
invokevirtual java.util.HashSet.add:(Ljava/lang/Object;)Z
pop
end local 6 5: goto 17
6: StackMap locals: org.jruby.embed.jsr223.ServiceFinder java.util.Collection java.lang.ClassLoader java.util.HashSet java.lang.String java.util.Iterator
StackMap stack: java.lang.ClassNotFoundException
pop
7: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
aload 4
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " was not found"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
8: goto 17
9: StackMap locals:
StackMap stack: java.lang.InstantiationException
pop
10: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
aload 4
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " was not instantiated"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
11: goto 17
12: StackMap locals:
StackMap stack: java.lang.IllegalAccessException
pop
13: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
aload 4
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " committed illegal access"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
14: goto 17
15: StackMap locals:
StackMap stack: java.lang.Throwable
pop
16: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "failed to instantiate "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 4
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
end local 4 17: StackMap locals: org.jruby.embed.jsr223.ServiceFinder java.util.Collection java.lang.ClassLoader java.util.HashSet top java.util.Iterator
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
18: aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lorg/jruby/embed/jsr223/ServiceFinder<TT;>;
0 19 1 names Ljava/util/Collection<Ljava/lang/String;>;
0 19 2 loader Ljava/lang/ClassLoader;
1 19 3 instances Ljava/util/HashSet<TT;>;
3 17 4 name Ljava/lang/String;
4 5 6 clazz Ljava/lang/Class<TT;>;
Exception table:
from to target type
3 5 6 Class java.lang.ClassNotFoundException
3 5 9 Class java.lang.InstantiationException
3 5 12 Class java.lang.IllegalAccessException
3 5 15 Class java.lang.Throwable
Signature: (Ljava/util/Collection<Ljava/lang/String;>;Ljava/lang/ClassLoader;)Ljava/util/Set<TT;>;
MethodParameters:
Name Flags
names final
loader final
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;
SourceFile: "ServiceFinder.java"