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 31
iload 1 /* fromIndex */
istore 4 /* low */
start local 4 // int low
1: .line 32
iload 2 /* toIndex */
iconst_1
isub
istore 5 /* high */
start local 5 // int high
2: .line 34
goto 10
3: .line 35
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 36
aload 0 /* a */
iload 6 /* mid */
iaload
istore 7 /* midVal */
start local 7 // int midVal
5: .line 38
iload 7 /* midVal */
iload 3 /* key */
if_icmpge 7
6: .line 39
iload 6 /* mid */
iconst_1
iadd
istore 4 /* low */
goto 10
7: .line 40
StackMap locals: int int
StackMap stack:
iload 7 /* midVal */
iload 3 /* key */
if_icmple 9
8: .line 41
iload 6 /* mid */
iconst_1
isub
istore 5 /* high */
goto 10
9: .line 43
StackMap locals:
StackMap stack:
iload 6 /* mid */
ireturn
end local 7 // int midVal
end local 6 // int mid
10: .line 34
StackMap locals:
StackMap stack:
iload 4 /* low */
iload 5 /* high */
if_icmple 3
11: .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 12 0 a [I
0 12 1 fromIndex I
0 12 2 toIndex I
0 12 3 key I
1 12 4 low I
2 12 5 high I
4 10 6 mid I
5 10 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 78
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 79
iload 3 /* idx */
iconst_m1
if_icmpne 6
2: .line 80
aload 0 /* array */
arraylength
istore 4 /* length */
start local 4 // int length
3: .line 81
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 82
aload 5 /* newArray */
iload 4 /* length */
aload 1 /* element */
aastore
5: .line 83
aload 5 /* newArray */
areturn
end local 5 // java.lang.Object[] newArray
end local 4 // int length
6: .line 86
StackMap locals: int
StackMap stack:
iload 2 /* replaceElementIfEquals */
ifeq 8
7: .line 87
aload 0 /* array */
iload 3 /* idx */
aload 1 /* element */
aastore
8: .line 90
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 106
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 107
iload 2 /* idx */
iconst_m1
if_icmpeq 12
2: .line 108
aload 0 /* array */
arraylength
istore 3 /* length */
start local 3 // int length
3: .line 110
iload 3 /* length */
iconst_1
if_icmpne 5
4: .line 111
aconst_null
areturn
5: .line 115
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
6: .line 114
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
7: .line 117
iload 2 /* idx */
ifle 9
8: .line 118
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
9: .line 121
StackMap locals: java.lang.Object[]
StackMap stack:
iload 2 /* idx */
iload 3 /* length */
iconst_1
isub
if_icmpge 11
10: .line 122
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
11: .line 125
StackMap locals:
StackMap stack:
aload 4 /* newArray */
areturn
end local 4 // java.lang.Object[] newArray
end local 3 // int length
12: .line 128
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 13 0 array [Ljava/lang/Object;
0 13 1 element Ljava/lang/Object;
1 13 2 idx I
3 12 3 length I
7 12 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 140
iconst_0
istore 2 /* i */
start local 2 // int i
1: goto 5
2: .line 141
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 142
iload 2 /* i */
ireturn
4: .line 140
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 146
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"