[java]jdk反编译器

阅读更多
javap -c package.ClassName

//...
   349: iconst_0
   350: iload   11
   352: iload   4
   354: iadd
   355: invokestatic    #427; //Method java/lang/System.arraycopy:(Ljava/lang/Ob
ject;ILjava/lang/Object;II)V
   358: aload   13
   360: astore_3
   361: iconst_0
   362: istore  13
   364: iload   13
   366: iload   12
   368: if_icmpge       392
   371: aload_3
   372: iload   11
   374: iload   4
   376: iadd
   377: iload   13
   379: iadd
   380: aload   7
   382: iload   13
   384: caload
   385: castore
   386: iinc    13, 1
   389: goto    364
   392: iload   4
   394: iload   12
   396: iload   10
   398: isub
   399: iadd
   400: istore  4
   402: goto    415
   405: aload_3
   406: iload   11
   408: iload   4
   410: iadd
   411: iload   8
   413: i2c
   414: castore
   415: iload   11
   417: iload   10
   419: iadd
   420: istore  11
   422: goto    156
   425: new     #200; //class java/lang/String
   428: dup
   429: iconst_0
   430: aload_0
   431: getfield        #353; //Field count:I
   434: iload   4
   436: iadd
   437: aload_3
   438: invokespecial   #393; //Method "":(II[C)V
   441: areturn

public java.lang.String toUpperCase();
  Code:
   0:   aload_0
   1:   invokestatic    #435; //Method java/util/Locale.getDefault:()Ljava/util/
Locale;
   4:   invokevirtual   #415; //Method toUpperCase:(Ljava/util/Locale;)Ljava/lan
g/String;
   7:   areturn

public java.lang.String trim();
  Code:
   0:   aload_0
   1:   getfield        #353; //Field count:I
   4:   istore_1
   5:   iconst_0
   6:   istore_2
   7:   aload_0
   8:   getfield        #355; //Field offset:I
   11:  istore_3
   12:  aload_0
   13:  getfield        #356; //Field value:[C
   16:  astore  4
   18:  iload_2
   19:  iload_1
   20:  if_icmpge       40
   23:  aload   4
   25:  iload_3
   26:  iload_2
   27:  iadd
   28:  caload
   29:  bipush  32
   31:  if_icmpgt       40
   34:  iinc    2, 1
   37:  goto    18
   40:  iload_2
   41:  iload_1
   42:  if_icmpge       64
   45:  aload   4
   47:  iload_3
   48:  iload_1
   49:  iadd
   50:  iconst_1
   51:  isub
   52:  caload
   53:  bipush  32
   55:  if_icmpgt       64
   58:  iinc    1, -1
   61:  goto    40
   64:  iload_2
   65:  ifgt    76
   68:  iload_1
   69:  aload_0
   70:  getfield        #353; //Field count:I
   73:  if_icmpge       85
   76:  aload_0
   77:  iload_2
   78:  iload_1
   79:  invokevirtual   #403; //Method substring:(II)Ljava/lang/String;
   82:  goto    86
   85:  aload_0
   86:  areturn

public java.lang.String toString();
  Code:
   0:   aload_0
   1:   areturn

public char[] toCharArray();
  Code:
   0:   aload_0
   1:   getfield        #353; //Field count:I
   4:   newarray char
   6:   astore_1
   7:   aload_0
   8:   iconst_0
   9:   aload_0
   10:  getfield        #353; //Field count:I
   13:  aload_1
   14:  iconst_0
   15:  invokevirtual   #394; //Method getChars:(II[CI)V
   18:  aload_1
   19:  areturn

public static java.lang.String format(java.lang.String, java.lang.Object[]);
  Code:
   0:   new     #211; //class java/util/Formatter
   3:   dup
   4:   invokespecial   #430; //Method java/util/Formatter."":()V
   7:   aload_0
   8:   aload_1
   9:   invokevirtual   #433; //Method java/util/Formatter.format:(Ljava/lang/St
ring;[Ljava/lang/Object;)Ljava/util/Formatter;
   12:  invokevirtual   #431; //Method java/util/Formatter.toString:()Ljava/lang
/String;
   15:  areturn

public static java.lang.String format(java.util.Locale, java.lang.String, java.l
ang.Object[]);
  Code:
   0:   new     #211; //class java/util/Formatter
   3:   dup
   4:   aload_0
   5:   invokespecial   #432; //Method java/util/Formatter."":(Ljava/util/
Locale;)V
   8:   aload_1
   9:   aload_2
   10:  invokevirtual   #433; //Method java/util/Formatter.format:(Ljava/lang/St
ring;[Ljava/lang/Object;)Ljava/util/Formatter;
   13:  invokevirtual   #431; //Method java/util/Formatter.toString:()Ljava/lang
/String;
   16:  areturn

public static java.lang.String valueOf(java.lang.Object);
  Code:
   0:   aload_0
   1:   ifnonnull       9
   4:   ldc     #10; //String null
   6:   goto    13
   9:   aload_0
   10:  invokevirtual   #388; //Method java/lang/Object.toString:()Ljava/lang/St
ring;
   13:  areturn

public static java.lang.String valueOf(char[]);
  Code:
   0:   new     #200; //class java/lang/String
   3:   dup
   4:   aload_0
   5:   invokespecial   #398; //Method "":([C)V
   8:   areturn

public static java.lang.String valueOf(char[], int, int);
  Code:
   0:   new     #200; //class java/lang/String
   3:   dup
   4:   aload_0
   5:   iload_1
   6:   iload_2
   7:   invokespecial   #399; //Method "":([CII)V
   10:  areturn

public static java.lang.String copyValueOf(char[], int, int);
  Code:
   0:   new     #200; //class java/lang/String
   3:   dup
   4:   aload_0
   5:   iload_1
   6:   iload_2
   7:   invokespecial   #399; //Method "":([CII)V
   10:  areturn

public static java.lang.String copyValueOf(char[]);
  Code:
   0:   aload_0
   1:   iconst_0
   2:   aload_0
   3:   arraylength
   4:   invokestatic    #411; //Method copyValueOf:([CII)Ljava/lang/String;
   7:   areturn

public static java.lang.String valueOf(boolean);
  Code:
   0:   iload_0
   1:   ifeq    9
   4:   ldc     #12; //String true
   6:   goto    11
   9:   ldc     #8; //String false
   11:  areturn

public static java.lang.String valueOf(char);
  Code:
   0:   iconst_1
   1:   newarray char
   3:   dup
   4:   iconst_0
   5:   iload_0
   6:   castore
   7:   astore_1
   8:   new     #200; //class java/lang/String
   11:  dup
   12:  iconst_0
   13:  iconst_1
   14:  aload_1
   15:  invokespecial   #393; //Method "":(II[C)V
   18:  areturn

public static java.lang.String valueOf(int);
  Code:
   0:   iload_0
   1:   bipush  10
   3:   invokestatic    #381; //Method java/lang/Integer.toString:(II)Ljava/lang
/String;
   6:   areturn

public static java.lang.String valueOf(long);
  Code:
   0:   lload_0
   1:   bipush  10
   3:   invokestatic    #382; //Method java/lang/Long.toString:(JI)Ljava/lang/St
ring;
   6:   areturn

public static java.lang.String valueOf(float);
  Code:
   0:   fload_0
   1:   invokestatic    #378; //Method java/lang/Float.toString:(F)Ljava/lang/St
ring;
   4:   areturn

public static java.lang.String valueOf(double);
  Code:
   0:   dload_0
   1:   invokestatic    #377; //Method java/lang/Double.toString:(D)Ljava/lang/S
tring;
   4:   areturn

public native java.lang.String intern();

public int compareTo(java.lang.Object);
  Code:
   0:   aload_0
   1:   aload_1
   2:   checkcast       #200; //class java/lang/String
   5:   invokevirtual   #404; //Method compareTo:(Ljava/lang/String;)I
   8:   ireturn

static {};
  Code:
   0:   iconst_0
   1:   anewarray       #183; //class java/io/ObjectStreamField
   4:   putstatic       #357; //Field serialPersistentFields:[Ljava/io/ObjectStr
eamField;
   7:   new     #202; //class java/lang/String$CaseInsensitiveComparator
   10:  dup
   11:  aconst_null
   12:  invokespecial   #416; //Method java/lang/String$CaseInsensitiveComparato
r."":(Ljava/lang/String$1;)V
   15:  putstatic       #358; //Field CASE_INSENSITIVE_ORDER:Ljava/util/Comparat
or;
   18:  return

}


你可能感兴趣的:(java,javap)