public final class java.util.OptionalInt
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: java.util.OptionalInt
super_class: java.lang.Object
{
private static final java.util.OptionalInt EMPTY;
descriptor: Ljava/util/OptionalInt;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final boolean isPresent;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int value;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new java.util.OptionalInt
dup
invokespecial java.util.OptionalInt.<init>:()V
putstatic java.util.OptionalInt.EMPTY:Ljava/util/OptionalInt;
return
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_0
putfield java.util.OptionalInt.isPresent:Z
2: aload 0
iconst_0
putfield java.util.OptionalInt.value:I
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljava/util/OptionalInt;
public static java.util.OptionalInt empty();
descriptor: ()Ljava/util/OptionalInt;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic java.util.OptionalInt.EMPTY:Ljava/util/OptionalInt;
areturn
LocalVariableTable:
Start End Slot Name Signature
private void <init>(int);
descriptor: (I)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_1
putfield java.util.OptionalInt.isPresent:Z
2: aload 0
iload 1
putfield java.util.OptionalInt.value:I
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljava/util/OptionalInt;
0 4 1 value I
MethodParameters:
Name Flags
value
public static java.util.OptionalInt of(int);
descriptor: (I)Ljava/util/OptionalInt;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.util.OptionalInt
dup
iload 0
invokespecial java.util.OptionalInt.<init>:(I)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 value I
MethodParameters:
Name Flags
value
public int getAsInt();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifne 2
1: new java.util.NoSuchElementException
dup
ldc "No value present"
invokespecial java.util.NoSuchElementException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield java.util.OptionalInt.value:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/OptionalInt;
public boolean isPresent();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/OptionalInt;
public boolean isEmpty();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifeq 1
iconst_0
goto 2
StackMap locals:
StackMap stack:
1: iconst_1
StackMap locals:
StackMap stack: int
2: ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/OptionalInt;
public void ifPresent(java.util.function.IntConsumer);
descriptor: (Ljava/util/function/IntConsumer;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifeq 2
1: aload 1
aload 0
getfield java.util.OptionalInt.value:I
invokeinterface java.util.function.IntConsumer.accept:(I)V
2: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/OptionalInt;
0 3 1 action Ljava/util/function/IntConsumer;
MethodParameters:
Name Flags
action
public void ifPresentOrElse(java.util.function.IntConsumer, java.lang.Runnable);
descriptor: (Ljava/util/function/IntConsumer;Ljava/lang/Runnable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifeq 3
1: aload 1
aload 0
getfield java.util.OptionalInt.value:I
invokeinterface java.util.function.IntConsumer.accept:(I)V
2: goto 4
3: StackMap locals:
StackMap stack:
aload 2
invokeinterface java.lang.Runnable.run:()V
4: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljava/util/OptionalInt;
0 5 1 action Ljava/util/function/IntConsumer;
0 5 2 emptyAction Ljava/lang/Runnable;
MethodParameters:
Name Flags
action
emptyAction
public java.util.stream.IntStream stream();
descriptor: ()Ljava/util/stream/IntStream;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifeq 2
1: aload 0
getfield java.util.OptionalInt.value:I
invokestatic java.util.stream.IntStream.of:(I)Ljava/util/stream/IntStream;
areturn
2: StackMap locals:
StackMap stack:
invokestatic java.util.stream.IntStream.empty:()Ljava/util/stream/IntStream;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/OptionalInt;
public int orElse(int);
descriptor: (I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifeq 1
aload 0
getfield java.util.OptionalInt.value:I
goto 2
StackMap locals:
StackMap stack:
1: iload 1
StackMap locals:
StackMap stack: int
2: ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/OptionalInt;
0 3 1 other I
MethodParameters:
Name Flags
other
public int orElseGet(java.util.function.IntSupplier);
descriptor: (Ljava/util/function/IntSupplier;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifeq 1
aload 0
getfield java.util.OptionalInt.value:I
goto 2
StackMap locals:
StackMap stack:
1: aload 1
invokeinterface java.util.function.IntSupplier.getAsInt:()I
StackMap locals:
StackMap stack: int
2: ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/OptionalInt;
0 3 1 supplier Ljava/util/function/IntSupplier;
MethodParameters:
Name Flags
supplier
public int orElseThrow();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifne 2
1: new java.util.NoSuchElementException
dup
ldc "No value present"
invokespecial java.util.NoSuchElementException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield java.util.OptionalInt.value:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/OptionalInt;
public <X extends java.lang.Throwable> int orElseThrow(java.util.function.Supplier<? extends X>) throws X;
descriptor: (Ljava/util/function/Supplier;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifeq 2
1: aload 0
getfield java.util.OptionalInt.value:I
ireturn
2: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.util.function.Supplier.get:()Ljava/lang/Object;
checkcast java.lang.Throwable
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/OptionalInt;
0 3 1 exceptionSupplier Ljava/util/function/Supplier<+TX;>;
Exceptions:
throws java.lang.Throwable
Signature: <X:Ljava/lang/Throwable;>(Ljava/util/function/Supplier<+TX;>;)I^TX;
MethodParameters:
Name Flags
exceptionSupplier
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
instanceof java.util.OptionalInt
ifne 4
3: iconst_0
ireturn
4: StackMap locals:
StackMap stack:
aload 1
checkcast java.util.OptionalInt
astore 2
start local 2 5: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifeq 8
aload 2
getfield java.util.OptionalInt.isPresent:Z
ifeq 8
6: aload 0
getfield java.util.OptionalInt.value:I
aload 2
getfield java.util.OptionalInt.value:I
if_icmpne 7
iconst_1
goto 10
StackMap locals: java.util.OptionalInt
StackMap stack:
7: iconst_0
goto 10
8: StackMap locals:
StackMap stack:
aload 0
getfield java.util.OptionalInt.isPresent:Z
aload 2
getfield java.util.OptionalInt.isPresent:Z
if_icmpne 9
iconst_1
goto 10
StackMap locals:
StackMap stack:
9: iconst_0
10: StackMap locals:
StackMap stack: int
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Ljava/util/OptionalInt;
0 11 1 obj Ljava/lang/Object;
5 11 2 other Ljava/util/OptionalInt;
MethodParameters:
Name Flags
obj
public int hashCode();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifeq 1
aload 0
getfield java.util.OptionalInt.value:I
invokestatic java.lang.Integer.hashCode:(I)I
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/OptionalInt;
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.OptionalInt.isPresent:Z
ifeq 2
1: ldc "OptionalInt[%s]"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield java.util.OptionalInt.value:I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
goto 3
2: StackMap locals:
StackMap stack:
ldc "OptionalInt.empty"
3: StackMap locals:
StackMap stack: java.lang.String
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljava/util/OptionalInt;
}
SourceFile: "OptionalInt.java"
RuntimeVisibleAnnotations:
jdk.internal.ValueBased()