Skip to content

Instantly share code, notes, and snippets.

@xtremegit
Created August 3, 2022 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xtremegit/6abbe71af8db9442aa4b6d95b67d50ff to your computer and use it in GitHub Desktop.
Save xtremegit/6abbe71af8db9442aa4b6d95b67d50ff to your computer and use it in GitHub Desktop.
private static int getPriority(int);
0: iload_0
1: tableswitch { // 4 to 10
4: 44
5: 51
6: 58
7: 65
8: 72
9: 79
10: 86
default: 93
}
44: getstatic #2 // Field Test$CameraType.CAMERA_1:LTest$CameraType;
47: invokevirtual #3 // Method Test$CameraType.getPriority:()I
50: ireturn
51: getstatic #4 // Field Test$CameraType.CAMERA_2:LTest$CameraType;
54: invokevirtual #3 // Method Test$CameraType.getPriority:()I
57: ireturn
58: getstatic #5 // Field Test$CameraType.CAMERA_3:LTest$CameraType;
61: invokevirtual #3 // Method Test$CameraType.getPriority:()I
64: ireturn
65: getstatic #6 // Field Test$CameraType.CAMERA_4:LTest$CameraType;
68: invokevirtual #3 // Method Test$CameraType.getPriority:()I
71: ireturn
72: getstatic #7 // Field Test$CameraType.CAMERA_5:LTest$CameraType;
75: invokevirtual #3 // Method Test$CameraType.getPriority:()I
78: ireturn
79: getstatic #8 // Field Test$CameraType.CAMERA_6:LTest$CameraType;
82: invokevirtual #3 // Method Test$CameraType.getPriority:()I
85: ireturn
86: getstatic #9 // Field Test$CameraType.CAMERA_7:LTest$CameraType;
89: invokevirtual #3 // Method Test$CameraType.getPriority:()I
92: ireturn
93: iconst_m1
94: ireturn
private static int getPriority1(int);
0: invokestatic #10 // Method Test$CameraType.values:()[LTest$CameraType;
3: astore_1
4: aload_1
5: arraylength
6: istore_2
7: iconst_0
8: istore_3
9: iload_3
10: iload_2
11: if_icmpge 40
14: aload_1
15: iload_3
16: aaload
17: astore 4
19: aload 4
21: invokevirtual #11 // Method Test$CameraType.getCameraType:()I
24: iload_0
25: if_icmpne 34
28: aload 4
30: invokevirtual #3 // Method Test$CameraType.getPriority:()I
33: ireturn
34: iinc 3, 1
37: goto 9
40: iconst_m1
41: ireturn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment