包裹类型Short

以下是包裹类型Short的一些描述:

//  (version 1.8 : 52.0, super bit)
// Signature: Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Short;>;
public final class java.lang.Short extends java.lang.Number implements java.lang.Comparable {

// Field descriptor #40 S
public static final short MIN_VALUE = -32768;

// Field descriptor #40 S
public static final short MAX_VALUE = 32767;

// Field descriptor #37 Ljava/lang/Class;
// Signature: Ljava/lang/Class<Ljava/lang/Short;>;
public static final java.lang.Class TYPE;

// Field descriptor #40 S
private final short value;

// Field descriptor #34 I
public static final int SIZE = 16;

// Field descriptor #34 I
public static final int BYTES = 2;

// Field descriptor #36 J
private static final long serialVersionUID = 7515723908773894738L;

// Method descriptor #104 (S)Ljava/lang/String;
// Stack: 2, Locals: 1
public static java.lang.String toString(short arg0);
0  iload_0 [arg0]
1  bipush 10
3  invokestatic java.lang.Integer.toString(int, int) : java.lang.String [138]
6  areturn

// Method descriptor #103 (Ljava/lang/String;I)S
// Stack: 4, Locals: 3
public static short parseShort(java.lang.String arg0, int arg1) throws java.lang.NumberFormatException;
0  aload_0 [arg0]
1  iload_1 [arg1]
2  invokestatic java.lang.Integer.parseInt(java.lang.String, int) : int [139]
5  istore_2
6  iload_2
7  sipush -32768
10  if_icmplt 20
13  iload_2
14  sipush 32767
17  if_icmple 56
20  new java.lang.NumberFormatException [92]
23  dup
24  new java.lang.StringBuilder [95]
27  dup
28  invokespecial java.lang.StringBuilder() [151]
31  ldc <String “Value out of range. Value:””> [6]
33  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [154]
36  aload_0 [arg0]
37  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [154]
40  ldc <String “” Radix:”> [4]
42  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [154]
45  iload_1 [arg1]
46  invokevirtual java.lang.StringBuilder.append(int) : java.lang.StringBuilder [153]
49  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [152]
52  invokespecial java.lang.NumberFormatException(java.lang.String) [142]
55  athrow
56  iload_2
57  i2s
58  ireturn
Stack map table: number of frames 2
[pc: 20, append: {int}]
[pc: 56, same]

// Method descriptor #101 (Ljava/lang/String;)S
// Stack: 2, Locals: 1
public static short parseShort(java.lang.String arg0) throws java.lang.NumberFormatException;
0  aload_0 [arg0]
1  bipush 10
3  invokestatic java.lang.Short.parseShort(java.lang.String, int) : short [149]
6  ireturn

// Method descriptor #108 (Ljava/lang/String;I)Ljava/lang/Short;
// Stack: 2, Locals: 2
public static java.lang.Short valueOf(java.lang.String arg0, int arg1) throws java.lang.NumberFormatException;
0  aload_0 [arg0]
1  iload_1 [arg1]
2  invokestatic java.lang.Short.parseShort(java.lang.String, int) : short [149]
5  invokestatic java.lang.Short.valueOf(short) : java.lang.Short [148]
8  areturn

// Method descriptor #107 (Ljava/lang/String;)Ljava/lang/Short;
// Stack: 2, Locals: 1
public static java.lang.Short valueOf(java.lang.String arg0) throws java.lang.NumberFormatException;
0  aload_0 [arg0]
1  bipush 10
3  invokestatic java.lang.Short.valueOf(java.lang.String, int) : java.lang.Short [150]
6  areturn

// Method descriptor #100 (S)Ljava/lang/Short;
// Stack: 3, Locals: 3
public static java.lang.Short valueOf(short arg0);
0  iload_0 [arg0]
1  istore_2
2  iload_2
3  bipush -128
5  if_icmplt 24
8  iload_2
9  bipush 127
11  if_icmpgt 24
14  getstatic java.lang.Short$ShortCache.cache : java.lang.Short[] [134]
17  iload_2
18  sipush 128
21  iadd
22  aaload
23  areturn
24  new java.lang.Short [93]
27  dup
28  iload_0 [arg0]
29  invokespecial java.lang.Short(short) [145]
32  areturn
Stack map table: number of frames 1
[pc: 24, append: {_, int}]

// Method descriptor #107 (Ljava/lang/String;)Ljava/lang/Short;
// Stack: 4, Locals: 2
public static java.lang.Short decode(java.lang.String arg0) throws java.lang.NumberFormatException;
0  aload_0 [arg0]
1  invokestatic java.lang.Integer.decode(java.lang.String) : java.lang.Integer [140]
4  invokevirtual java.lang.Integer.intValue() : int [136]
7  istore_1
8  iload_1
9  sipush -32768
12  if_icmplt 22
15  iload_1
16  sipush 32767
19  if_icmple 58
22  new java.lang.NumberFormatException [92]
25  dup
26  new java.lang.StringBuilder [95]
29  dup
30  invokespecial java.lang.StringBuilder() [151]
33  ldc <String “Value “> [5]
35  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [154]
38  iload_1
39  invokevirtual java.lang.StringBuilder.append(int) : java.lang.StringBuilder [153]
42  ldc <String ” out of range from input “> [3]
44  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [154]
47  aload_0 [arg0]
48  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [154]
51  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [152]
54  invokespecial java.lang.NumberFormatException(java.lang.String) [142]
57  athrow
58  iload_1
59  i2s
60  invokestatic java.lang.Short.valueOf(short) : java.lang.Short [148]
63  areturn
Stack map table: number of frames 2
[pc: 22, append: {int}]
[pc: 58, same]

// Method descriptor #26 (S)V
// Stack: 2, Locals: 2
public Short(short arg0);
0  aload_0 [this]
1  invokespecial java.lang.Number() [141]
4  aload_0 [this]
5  iload_1 [arg0]
6  putfield java.lang.Short.value : short [132]
9  return

// Method descriptor #22 (Ljava/lang/String;)V
// Stack: 3, Locals: 2
public Short(java.lang.String arg0) throws java.lang.NumberFormatException;
0  aload_0 [this]
1  invokespecial java.lang.Number() [141]
4  aload_0 [this]
5  aload_1 [arg0]
6  bipush 10
8  invokestatic java.lang.Short.parseShort(java.lang.String, int) : short [149]
11  putfield java.lang.Short.value : short [132]
14  return

// Method descriptor #10 ()B
// Stack: 1, Locals: 1
public byte byteValue();
0  aload_0 [this]
1  getfield java.lang.Short.value : short [132]
4  i2b
5  ireturn

// Method descriptor #16 ()S
// Stack: 1, Locals: 1
public short shortValue();
0  aload_0 [this]
1  getfield java.lang.Short.value : short [132]
4  ireturn

// Method descriptor #13 ()I
// Stack: 1, Locals: 1
public int intValue();
0  aload_0 [this]
1  getfield java.lang.Short.value : short [132]
4  ireturn

// Method descriptor #14 ()J
// Stack: 2, Locals: 1
public long longValue();
0  aload_0 [this]
1  getfield java.lang.Short.value : short [132]
4  i2l
5  lreturn

// Method descriptor #12 ()F
// Stack: 1, Locals: 1
public float floatValue();
0  aload_0 [this]
1  getfield java.lang.Short.value : short [132]
4  i2f
5  freturn

// Method descriptor #11 ()D
// Stack: 2, Locals: 1
public double doubleValue();
0  aload_0 [this]
1  getfield java.lang.Short.value : short [132]
4  i2d
5  dreturn

// Method descriptor #15 ()Ljava/lang/String;
// Stack: 1, Locals: 1
public java.lang.String toString();
0  aload_0 [this]
1  getfield java.lang.Short.value : short [132]
4  invokestatic java.lang.Integer.toString(int) : java.lang.String [137]
7  areturn

// Method descriptor #13 ()I
// Stack: 1, Locals: 1
public int hashCode();
0  aload_0 [this]
1  getfield java.lang.Short.value : short [132]
4  invokestatic java.lang.Short.hashCode(short) : int [144]
7  ireturn

// Method descriptor #23 (S)I
// Stack: 1, Locals: 1
public static int hashCode(short arg0);
0  iload_0 [arg0]
1  ireturn

// Method descriptor #20 (Ljava/lang/Object;)Z
// Stack: 2, Locals: 2
public boolean equals(java.lang.Object arg0);
0  aload_1 [arg0]
1  instanceof java.lang.Short [93]
4  ifeq 27
7  aload_0 [this]
8  getfield java.lang.Short.value : short [132]
11  aload_1 [arg0]
12  checkcast java.lang.Short [93]
15  invokevirtual java.lang.Short.shortValue() : short [143]
18  if_icmpne 25
21  iconst_1
22  goto 26
25  iconst_0
26  ireturn
27  iconst_0
28  ireturn
Stack map table: number of frames 3
[pc: 25, same]
[pc: 26, same_locals_1_stack_item, stack: {int}]
[pc: 27, same]

// Method descriptor #99 (Ljava/lang/Short;)I
// Stack: 2, Locals: 2
public int compareTo(java.lang.Short arg0);
0  aload_0 [this]
1  getfield java.lang.Short.value : short [132]
4  aload_1 [arg0]
5  getfield java.lang.Short.value : short [132]
8  invokestatic java.lang.Short.compare(short, short) : int [146]
11  ireturn

// Method descriptor #27 (SS)I
// Stack: 2, Locals: 2
public static int compare(short arg0, short arg1);
0  iload_0 [arg0]
1  iload_1 [arg1]
2  isub
3  ireturn

// Method descriptor #25 (S)S
// Stack: 3, Locals: 1
public static short reverseBytes(short arg0);
0  iload_0 [arg0]
1  ldc <Integer 65280> [1]
3  iand
4  bipush 8
6  ishr
7  iload_0 [arg0]
8  bipush 8
10  ishl
11  ior
12  i2s
13  ireturn

// Method descriptor #23 (S)I
// Stack: 2, Locals: 1
public static int toUnsignedInt(short arg0);
0  iload_0 [arg0]
1  ldc <Integer 65535> [2]
3  iand
4  ireturn

// Method descriptor #24 (S)J
// Stack: 4, Locals: 1
public static long toUnsignedLong(short arg0);
0  iload_0 [arg0]
1  i2l
2  ldc2_w <Long 65535> [84]
5  land
6  lreturn

// Method descriptor #98 (Ljava/lang/Object;)I
// Stack: 2, Locals: 2
public bridge synthetic int compareTo(java.lang.Object arg0);
0  aload_0 [this]
1  aload_1 [arg0]
2  checkcast java.lang.Short [93]
5  invokevirtual java.lang.Short.compareTo(java.lang.Short) : int [147]
8  ireturn

// Method descriptor #17 ()V
// Stack: 1, Locals: 0
static {};
0  ldc <String “short”> [7]
2  invokestatic java.lang.Class.getPrimitiveClass(java.lang.String) : java.lang.Class [135]
5  putstatic java.lang.Short.TYPE : java.lang.Class [133]
8  return

Inner classes:
[inner class info: #94 java/lang/Short$ShortCache, outer class info: #93 java/lang/Short
inner name: #155 ShortCache, accessflags: 10 private static]
}

《包裹类型Short》上有1条评论

评论已关闭。