利用IDEA反编译class文件


springboot项目反编译class文件

  • 在项目所在target目录找到class文件

  • 将class文件复制到任意java文件目录内,通过idea打开class文件即为反编译后的文件

    java文件

package com.xuqp.study.structure;

/**
 * @author xuqiuping
 * @create 2021-06-16 23:00
 * @descripition
 */
public class Demo01 {
    public static void main(String[] args) {
        String name = "球拍";
        switch (name) {
            case "卡了":
                System.out.println("卡了");
                break;
            case "球拍":
                System.out.println("球拍");
                break;
        }
    }
}

class文件

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.xuqp.study.structure;

public class Demo01 {
    public Demo01() {
    }

    public static void main(String[] args) {
        String name = "球拍";
        byte var3 = -1;
        switch(name.hashCode()) {
        case 681797:
            if (name.equals("卡了")) {
                var3 = 0;
            }
            break;
        case 945962:
            if (name.equals("球拍")) {
                var3 = 1;
            }
        }

        switch(var3) {
        case 0:
            System.out.println("卡了");
            break;
        case 1:
            System.out.println("球拍");
        }

    }
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM