public abstract class org.jdbi.v3.testing.JdbiRule extends org.junit.rules.ExternalResource
minor version: 0
major version: 59
flags: flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
this_class: org.jdbi.v3.testing.JdbiRule
super_class: org.junit.rules.ExternalResource
{
private final java.util.List<org.jdbi.v3.core.spi.JdbiPlugin> plugins;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Lorg/jdbi/v3/core/spi/JdbiPlugin;>;
private final java.util.concurrent.locks.ReentrantLock lock;
descriptor: Ljava/util/concurrent/locks/ReentrantLock;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile javax.sql.DataSource dataSource;
descriptor: Ljavax/sql/DataSource;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private org.jdbi.v3.core.Jdbi jdbi;
descriptor: Lorg/jdbi/v3/core/Jdbi;
flags: (0x0002) ACC_PRIVATE
private org.jdbi.v3.core.Handle handle;
descriptor: Lorg/jdbi/v3/core/Handle;
flags: (0x0002) ACC_PRIVATE
private boolean installPlugins;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private org.jdbi.v3.testing.Migration migration;
descriptor: Lorg/jdbi/v3/testing/Migration;
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial org.junit.rules.ExternalResource.<init>:()V
1: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putfield org.jdbi.v3.testing.JdbiRule.plugins:Ljava/util/List;
2: aload 0
new java.util.concurrent.locks.ReentrantLock
dup
invokespecial java.util.concurrent.locks.ReentrantLock.<init>:()V
putfield org.jdbi.v3.testing.JdbiRule.lock:Ljava/util/concurrent/locks/ReentrantLock;
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jdbi/v3/testing/JdbiRule;
protected abstract javax.sql.DataSource createDataSource();
descriptor: ()Ljavax/sql/DataSource;
flags: (0x0404) ACC_PROTECTED, ACC_ABSTRACT
private javax.sql.DataSource getDataSource();
descriptor: ()Ljavax/sql/DataSource;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield org.jdbi.v3.testing.JdbiRule.dataSource:Ljavax/sql/DataSource;
ifnonnull 9
1: aload 0
getfield org.jdbi.v3.testing.JdbiRule.lock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.lock:()V
2: aload 0
getfield org.jdbi.v3.testing.JdbiRule.dataSource:Ljavax/sql/DataSource;
ifnonnull 8
3: aload 0
aload 0
invokevirtual org.jdbi.v3.testing.JdbiRule.createDataSource:()Ljavax/sql/DataSource;
putfield org.jdbi.v3.testing.JdbiRule.dataSource:Ljavax/sql/DataSource;
4: goto 8
StackMap locals:
StackMap stack: java.lang.Throwable
5: astore 1
6: aload 0
getfield org.jdbi.v3.testing.JdbiRule.lock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
7: aload 1
athrow
8: StackMap locals:
StackMap stack:
aload 0
getfield org.jdbi.v3.testing.JdbiRule.lock:Ljava/util/concurrent/locks/ReentrantLock;
invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
9: StackMap locals:
StackMap stack:
aload 0
getfield org.jdbi.v3.testing.JdbiRule.dataSource:Ljavax/sql/DataSource;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/jdbi/v3/testing/JdbiRule;
Exception table:
from to target type
1 5 5 any
public static org.jdbi.v3.testing.JdbiRule embeddedPostgres();
descriptor: ()Lorg/jdbi/v3/testing/JdbiRule;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new org.jdbi.v3.testing.EmbeddedPostgresJdbiRule
dup
invokespecial org.jdbi.v3.testing.EmbeddedPostgresJdbiRule.<init>:()V
areturn
LocalVariableTable:
Start End Slot Name Signature
public static org.jdbi.v3.testing.JdbiRule embeddedPostgres(java.util.function.Consumer<com.opentable.db.postgres.embedded.EmbeddedPostgres$Builder>);
descriptor: (Ljava/util/function/Consumer;)Lorg/jdbi/v3/testing/JdbiRule;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new org.jdbi.v3.testing.EmbeddedPostgresJdbiRule
dup
aload 0
invokespecial org.jdbi.v3.testing.EmbeddedPostgresJdbiRule.<init>:(Ljava/util/function/Consumer;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 customizer Ljava/util/function/Consumer<Lcom/opentable/db/postgres/embedded/EmbeddedPostgres$Builder;>;
Signature: (Ljava/util/function/Consumer<Lcom/opentable/db/postgres/embedded/EmbeddedPostgres$Builder;>;)Lorg/jdbi/v3/testing/JdbiRule;
MethodParameters:
Name Flags
customizer
public static org.jdbi.v3.testing.JdbiRule externalPostgres(java.lang.String, java.lang.Integer, java.lang.String, java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/jdbi/v3/testing/JdbiRule;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: new org.jdbi.v3.testing.ExternalPostgresJdbiRule
dup
aload 0
aload 1
aload 2
aload 3
aload 4
invokespecial org.jdbi.v3.testing.ExternalPostgresJdbiRule.<init>:(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 hostname Ljava/lang/String;
0 1 1 port Ljava/lang/Integer;
0 1 2 username Ljava/lang/String;
0 1 3 password Ljava/lang/String;
0 1 4 database Ljava/lang/String;
MethodParameters:
Name Flags
hostname final
port final
username final
password
database
public static org.jdbi.v3.testing.JdbiRule h2();
descriptor: ()Lorg/jdbi/v3/testing/JdbiRule;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new org.jdbi.v3.testing.EmbeddedH2JdbiRule
dup
invokespecial org.jdbi.v3.testing.EmbeddedH2JdbiRule.<init>:()V
areturn
LocalVariableTable:
Start End Slot Name Signature
public static org.jdbi.v3.testing.JdbiRule sqlite();
descriptor: ()Lorg/jdbi/v3/testing/JdbiRule;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new org.jdbi.v3.testing.EmbeddedSqliteJdbiRule
dup
invokespecial org.jdbi.v3.testing.EmbeddedSqliteJdbiRule.<init>:()V
areturn
LocalVariableTable:
Start End Slot Name Signature
public org.jdbi.v3.testing.JdbiRule migrateWithFlyway();
descriptor: ()Lorg/jdbi/v3/testing/JdbiRule;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
iconst_1
anewarray java.lang.String
dup
iconst_0
ldc "db/migration"
aastore
invokevirtual org.jdbi.v3.testing.JdbiRule.migrateWithFlyway:([Ljava/lang/String;)Lorg/jdbi/v3/testing/JdbiRule;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jdbi/v3/testing/JdbiRule;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
public org.jdbi.v3.testing.JdbiRule migrateWithFlyway(java.lang.String[]);
descriptor: ([Ljava/lang/String;)Lorg/jdbi/v3/testing/JdbiRule;
flags: (0x0081) ACC_PUBLIC, ACC_VARARGS
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokestatic org.jdbi.v3.testing.Migration.before:()Lorg/jdbi/v3/testing/Migration;
aload 1
invokevirtual org.jdbi.v3.testing.Migration.withPaths:([Ljava/lang/String;)Lorg/jdbi/v3/testing/Migration;
invokevirtual org.jdbi.v3.testing.JdbiRule.withMigration:(Lorg/jdbi/v3/testing/Migration;)Lorg/jdbi/v3/testing/JdbiRule;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jdbi/v3/testing/JdbiRule;
0 1 1 locations [Ljava/lang/String;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
locations
public org.jdbi.v3.testing.JdbiRule withMigration(org.jdbi.v3.testing.Migration);
descriptor: (Lorg/jdbi/v3/testing/Migration;)Lorg/jdbi/v3/testing/JdbiRule;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.jdbi.v3.testing.JdbiRule.migration:Lorg/jdbi/v3/testing/Migration;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jdbi/v3/testing/JdbiRule;
0 2 1 migration Lorg/jdbi/v3/testing/Migration;
MethodParameters:
Name Flags
migration final
public org.jdbi.v3.testing.JdbiRule withPlugins();
descriptor: ()Lorg/jdbi/v3/testing/JdbiRule;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_1
putfield org.jdbi.v3.testing.JdbiRule.installPlugins:Z
1: aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jdbi/v3/testing/JdbiRule;
public org.jdbi.v3.testing.JdbiRule withPlugin(org.jdbi.v3.core.spi.JdbiPlugin);
descriptor: (Lorg/jdbi/v3/core/spi/JdbiPlugin;)Lorg/jdbi/v3/testing/JdbiRule;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jdbi.v3.testing.JdbiRule.plugins:Ljava/util/List;
aload 1
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jdbi/v3/testing/JdbiRule;
0 2 1 plugin Lorg/jdbi/v3/core/spi/JdbiPlugin;
MethodParameters:
Name Flags
plugin final
public void before();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield org.jdbi.v3.testing.JdbiRule.migration:Lorg/jdbi/v3/testing/Migration;
ifnull 6
1: new org.flywaydb.core.Flyway
dup
invokespecial org.flywaydb.core.Flyway.<init>:()V
astore 1
start local 1 2: aload 1
aload 0
invokevirtual org.jdbi.v3.testing.JdbiRule.getDataSource:()Ljavax/sql/DataSource;
invokevirtual org.flywaydb.core.Flyway.setDataSource:(Ljavax/sql/DataSource;)V
3: aload 1
aload 0
getfield org.jdbi.v3.testing.JdbiRule.migration:Lorg/jdbi/v3/testing/Migration;
getfield org.jdbi.v3.testing.Migration.paths:Ljava/util/List;
iconst_0
anewarray java.lang.String
invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast java.lang.String[]
invokevirtual org.flywaydb.core.Flyway.setLocations:([Ljava/lang/String;)V
4: aload 1
aload 0
getfield org.jdbi.v3.testing.JdbiRule.migration:Lorg/jdbi/v3/testing/Migration;
getfield org.jdbi.v3.testing.Migration.schemas:Ljava/util/List;
iconst_0
anewarray java.lang.String
invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast java.lang.String[]
invokevirtual org.flywaydb.core.Flyway.setSchemas:([Ljava/lang/String;)V
5: aload 1
invokevirtual org.flywaydb.core.Flyway.migrate:()I
pop
end local 1 6: StackMap locals:
StackMap stack:
aload 0
aload 0
invokevirtual org.jdbi.v3.testing.JdbiRule.getDataSource:()Ljavax/sql/DataSource;
invokestatic org.jdbi.v3.core.Jdbi.create:(Ljavax/sql/DataSource;)Lorg/jdbi/v3/core/Jdbi;
putfield org.jdbi.v3.testing.JdbiRule.jdbi:Lorg/jdbi/v3/core/Jdbi;
7: aload 0
getfield org.jdbi.v3.testing.JdbiRule.installPlugins:Z
ifeq 9
8: aload 0
getfield org.jdbi.v3.testing.JdbiRule.jdbi:Lorg/jdbi/v3/core/Jdbi;
invokevirtual org.jdbi.v3.core.Jdbi.installPlugins:()Lorg/jdbi/v3/core/Jdbi;
pop
9: StackMap locals:
StackMap stack:
aload 0
getfield org.jdbi.v3.testing.JdbiRule.plugins:Ljava/util/List;
aload 0
getfield org.jdbi.v3.testing.JdbiRule.jdbi:Lorg/jdbi/v3/core/Jdbi;
dup
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
pop
invokedynamic accept(Lorg/jdbi/v3/core/Jdbi;)Ljava/util/function/Consumer;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
org/jdbi/v3/core/Jdbi.installPlugin(Lorg/jdbi/v3/core/spi/JdbiPlugin;)Lorg/jdbi/v3/core/Jdbi; (5)
(Lorg/jdbi/v3/core/spi/JdbiPlugin;)V
invokeinterface java.util.List.forEach:(Ljava/util/function/Consumer;)V
10: aload 0
aload 0
getfield org.jdbi.v3.testing.JdbiRule.jdbi:Lorg/jdbi/v3/core/Jdbi;
invokevirtual org.jdbi.v3.core.Jdbi.open:()Lorg/jdbi/v3/core/Handle;
putfield org.jdbi.v3.testing.JdbiRule.handle:Lorg/jdbi/v3/core/Handle;
11: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/jdbi/v3/testing/JdbiRule;
2 6 1 flyway Lorg/flywaydb/core/Flyway;
Exceptions:
throws java.lang.Throwable
public void after();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield org.jdbi.v3.testing.JdbiRule.migration:Lorg/jdbi/v3/testing/Migration;
ifnull 6
aload 0
getfield org.jdbi.v3.testing.JdbiRule.migration:Lorg/jdbi/v3/testing/Migration;
getfield org.jdbi.v3.testing.Migration.cleanAfter:Z
ifeq 6
1: new org.flywaydb.core.Flyway
dup
invokespecial org.flywaydb.core.Flyway.<init>:()V
astore 1
start local 1 2: aload 1
aload 0
invokevirtual org.jdbi.v3.testing.JdbiRule.getDataSource:()Ljavax/sql/DataSource;
invokevirtual org.flywaydb.core.Flyway.setDataSource:(Ljavax/sql/DataSource;)V
3: aload 1
aload 0
getfield org.jdbi.v3.testing.JdbiRule.migration:Lorg/jdbi/v3/testing/Migration;
getfield org.jdbi.v3.testing.Migration.paths:Ljava/util/List;
iconst_0
anewarray java.lang.String
invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast java.lang.String[]
invokevirtual org.flywaydb.core.Flyway.setLocations:([Ljava/lang/String;)V
4: aload 1
aload 0
getfield org.jdbi.v3.testing.JdbiRule.migration:Lorg/jdbi/v3/testing/Migration;
getfield org.jdbi.v3.testing.Migration.schemas:Ljava/util/List;
iconst_0
anewarray java.lang.String
invokeinterface java.util.List.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast java.lang.String[]
invokevirtual org.flywaydb.core.Flyway.setSchemas:([Ljava/lang/String;)V
5: aload 1
invokevirtual org.flywaydb.core.Flyway.clean:()V
end local 1 6: StackMap locals:
StackMap stack:
aload 0
getfield org.jdbi.v3.testing.JdbiRule.handle:Lorg/jdbi/v3/core/Handle;
invokevirtual org.jdbi.v3.core.Handle.close:()V
7: aload 0
aconst_null
putfield org.jdbi.v3.testing.JdbiRule.jdbi:Lorg/jdbi/v3/core/Jdbi;
8: aload 0
aconst_null
putfield org.jdbi.v3.testing.JdbiRule.dataSource:Ljavax/sql/DataSource;
9: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/jdbi/v3/testing/JdbiRule;
2 6 1 flyway Lorg/flywaydb/core/Flyway;
public org.jdbi.v3.core.Jdbi getJdbi();
descriptor: ()Lorg/jdbi/v3/core/Jdbi;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jdbi.v3.testing.JdbiRule.jdbi:Lorg/jdbi/v3/core/Jdbi;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jdbi/v3/testing/JdbiRule;
public org.jdbi.v3.core.Handle getHandle();
descriptor: ()Lorg/jdbi/v3/core/Handle;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jdbi.v3.testing.JdbiRule.handle:Lorg/jdbi/v3/core/Handle;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jdbi/v3/testing/JdbiRule;
public <T> T attach(java.lang.Class<T>);
descriptor: (Ljava/lang/Class;)Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jdbi.v3.testing.JdbiRule.getHandle:()Lorg/jdbi/v3/core/Handle;
aload 1
invokevirtual org.jdbi.v3.core.Handle.attach:(Ljava/lang/Class;)Ljava/lang/Object;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jdbi/v3/testing/JdbiRule;
0 1 1 extension Ljava/lang/Class<TT;>;
Signature: <T:Ljava/lang/Object;>(Ljava/lang/Class<TT;>;)TT;
MethodParameters:
Name Flags
extension final
}
SourceFile: "JdbiRule.java"
InnerClasses:
public Builder = com.opentable.db.postgres.embedded.EmbeddedPostgres$Builder of com.opentable.db.postgres.embedded.EmbeddedPostgres
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles