public final class org.glassfish.grizzly.utils.ArrayUtils
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.glassfish.grizzly.utils.ArrayUtils
super_class: java.lang.Object
{
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 // org.glassfish.grizzly.utils.ArrayUtils this
0: .line 27
aload 0 /* this */
invokespecial java.lang.Object.<init>:()V
return
end local 0 // org.glassfish.grizzly.utils.ArrayUtils this
LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/utils/ArrayUtils;
public static int binarySearch(int[], int, int, int);
descriptor: ([IIII)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=8, args_size=4
start local 0 // int[] a
start local 1 // int fromIndex
start local 2 // int toIndex
start local 3 // int key
0: .line 30
iload 1 /* fromIndex */
istore 4 /* low */
start local 4 // int low
1: .line 31
iload 2 /* toIndex */
iconst_1
isub
istore 5 /* high */
start local 5 // int high
2: .line 33
goto 12
3: .line 34
StackMap locals: int int
StackMap stack:
iload 4 /* low */
iload 5 /* high */
iadd
iconst_1
iushr
istore 6 /* mid */
start local 6 // int mid
4: .line 35
aload 0 /* a */
iload 6 /* mid */
iaload
istore 7 /* midVal */
start local 7 // int midVal
5: .line 37
iload 7 /* midVal */
iload 3 /* key */
if_icmpge 8
6: .line 38
iload 6 /* mid */
iconst_1
iadd
istore 4 /* low */
7: .line 39
goto 12
StackMap locals: int int
StackMap stack:
8: iload 7 /* midVal */
iload 3 /* key */
if_icmple 11
9: .line 40
iload 6 /* mid */
iconst_1
isub
istore 5 /* high */
10: .line 41
goto 12
11: .line 42
StackMap locals:
StackMap stack:
iload 6 /* mid */
ireturn
end local 7 // int midVal
end local 6 // int mid
12: .line 33
StackMap locals:
StackMap stack:
iload 4 /* low */
iload 5 /* high */
if_icmple 3
13: .line 45
iload 4 /* low */
ireturn
end local 5 // int high
end local 4 // int low
end local 3 // int key
end local 2 // int toIndex
end local 1 // int fromIndex
end local 0 // int[] a
LocalVariableTable:
Start End Slot Name Signature
0 14 0 a [I
0 14 1 fromIndex I
0 14 2 toIndex I
0 14 3 key I
1 14 4 low I
2 14 5 high I
4 12 6 mid I
5 12 7 midVal I
MethodParameters:
Name Flags
a final
fromIndex final
toIndex final
key final
public static <T> T[] addUnique(T[], );
descriptor: ([Ljava/lang/Object;Ljava/lang/Object;)[Ljava/lang/Object;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 // java.lang.Object[] array
start local 1 // java.lang.Object element
0: .line 59
aload 0 /* array */
aload 1 /* element */
iconst_1
invokestatic org.glassfish.grizzly.utils.ArrayUtils.addUnique:([Ljava/lang/Object;Ljava/lang/Object;Z)[Ljava/lang/Object;
areturn
end local 1 // java.lang.Object element
end local 0 // java.lang.Object[] array
LocalVariableTable:
Start End Slot Name Signature
0 1 0 array [Ljava/lang/Object;
0 1 1 element TT;
Signature: <T:Ljava/lang/Object;>([TT;TT;)[TT;
MethodParameters:
Name Flags
array
element
public static <T> T[] addUnique(T[], T, );
descriptor: ([Ljava/lang/Object;Ljava/lang/Object;Z)[Ljava/lang/Object;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=6, args_size=3
start local 0 // java.lang.Object[] array
start local 1 // java.lang.Object element
start local 2 // boolean replaceElementIfEquals
0: .line 76
aload 0 /* array */
aload 1 /* element */
invokestatic org.glassfish.grizzly.utils.ArrayUtils.indexOf:([Ljava/lang/Object;Ljava/lang/Object;)I
istore 3 /* idx */
start local 3 // int idx
1: .line 77
iload 3 /* idx */
iconst_m1
if_icmpne 6
2: .line 78
aload 0 /* array */
arraylength
istore 4 /* length */
start local 4 // int length
3: .line 79
aload 0 /* array */
iload 4 /* length */
iconst_1
iadd
invokestatic java.util.Arrays.copyOf:([Ljava/lang/Object;I)[Ljava/lang/Object;
astore 5 /* newArray */
start local 5 // java.lang.Object[] newArray
4: .line 80
aload 5 /* newArray */
iload 4 /* length */
aload 1 /* element */
aastore
5: .line 81
aload 5 /* newArray */
areturn
end local 5 // java.lang.Object[] newArray
end local 4 // int length
6: .line 84
StackMap locals: int
StackMap stack:
iload 2 /* replaceElementIfEquals */
ifeq 8
7: .line 85
aload 0 /* array */
iload 3 /* idx */
aload 1 /* element */
aastore
8: .line 88
StackMap locals:
StackMap stack:
aload 0 /* array */
areturn
end local 3 // int idx
end local 2 // boolean replaceElementIfEquals
end local 1 // java.lang.Object element
end local 0 // java.lang.Object[] array
LocalVariableTable:
Start End Slot Name Signature
0 9 0 array [Ljava/lang/Object;
0 9 1 element TT;
0 9 2 replaceElementIfEquals Z
1 9 3 idx I
3 6 4 length I
4 6 5 newArray [Ljava/lang/Object;
Signature: <T:Ljava/lang/Object;>([TT;TT;Z)[TT;
MethodParameters:
Name Flags
array final
element final
replaceElementIfEquals final
public static <T> T[] remove(T[], );
descriptor: ([Ljava/lang/Object;Ljava/lang/Object;)[Ljava/lang/Object;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=5, args_size=2
start local 0 // java.lang.Object[] array
start local 1 // java.lang.Object element
0: .line 104
aload 0 /* array */
aload 1 /* element */
invokestatic org.glassfish.grizzly.utils.ArrayUtils.indexOf:([Ljava/lang/Object;Ljava/lang/Object;)I
istore 2 /* idx */
start local 2 // int idx
1: .line 105
iload 2 /* idx */
iconst_m1
if_icmpeq 11
2: .line 106
aload 0 /* array */
arraylength
istore 3 /* length */
start local 3 // int length
3: .line 108
iload 3 /* length */
iconst_1
if_icmpne 5
4: .line 109
aconst_null
areturn
5: .line 112
StackMap locals: int int
StackMap stack:
aload 0 /* array */
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getComponentType:()Ljava/lang/Class;
iload 3 /* length */
iconst_1
isub
invokestatic java.lang.reflect.Array.newInstance:(Ljava/lang/Class;I)Ljava/lang/Object;
checkcast java.lang.Object[]
astore 4 /* newArray */
start local 4 // java.lang.Object[] newArray
6: .line 114
iload 2 /* idx */
ifle 8
7: .line 115
aload 0 /* array */
iconst_0
aload 4 /* newArray */
iconst_0
iload 2 /* idx */
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
8: .line 118
StackMap locals: java.lang.Object[]
StackMap stack:
iload 2 /* idx */
iload 3 /* length */
iconst_1
isub
if_icmpge 10
9: .line 119
aload 0 /* array */
iload 2 /* idx */
iconst_1
iadd
aload 4 /* newArray */
iload 2 /* idx */
iload 3 /* length */
iload 2 /* idx */
isub
iconst_1
isub
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
10: .line 122
StackMap locals:
StackMap stack:
aload 4 /* newArray */
areturn
end local 4 // java.lang.Object[] newArray
end local 3 // int length
11: .line 125
StackMap locals:
StackMap stack:
aload 0 /* array */
areturn
end local 2 // int idx
end local 1 // java.lang.Object element
end local 0 // java.lang.Object[] array
LocalVariableTable:
Start End Slot Name Signature
0 12 0 array [Ljava/lang/Object;
0 12 1 element Ljava/lang/Object;
1 12 2 idx I
3 11 3 length I
6 11 4 newArray [Ljava/lang/Object;
Signature: <T:Ljava/lang/Object;>([TT;Ljava/lang/Object;)[TT;
MethodParameters:
Name Flags
array
element
public static <T> int indexOf(T[], );
descriptor: ([Ljava/lang/Object;Ljava/lang/Object;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=3, args_size=2
start local 0 // java.lang.Object[] array
start local 1 // java.lang.Object element
0: .line 138
iconst_0
istore 2 /* i */
start local 2 // int i
1: goto 5
2: .line 139
StackMap locals: int
StackMap stack:
aload 1 /* element */
aload 0 /* array */
iload 2 /* i */
aaload
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 4
3: .line 140
iload 2 /* i */
ireturn
4: .line 138
StackMap locals:
StackMap stack:
iinc 2 /* i */ 1
StackMap locals:
StackMap stack:
5: iload 2 /* i */
aload 0 /* array */
arraylength
if_icmplt 2
end local 2 // int i
6: .line 144
iconst_m1
ireturn
end local 1 // java.lang.Object element
end local 0 // java.lang.Object[] array
LocalVariableTable:
Start End Slot Name Signature
0 7 0 array [Ljava/lang/Object;
0 7 1 element Ljava/lang/Object;
1 6 2 i I
Signature: <T:Ljava/lang/Object;>([TT;Ljava/lang/Object;)I
MethodParameters:
Name Flags
array
element
}
SourceFile: "ArrayUtils.java"