import org.xapi.bytecode.ClassFile; import org.xapi.bytecode.CodeParser; public class BytecodeParser { public static void main(String[] args) { String classFilePath = "path/to/YourClass.class"; try { ClassFile classFile = CodeParser.parse(classFilePath); String className = classFile.getName(); System.out.println("Class Name: " + className); List<Method> methods = classFile.getMethods(); for (Method method : methods) { String methodName = method.getName(); System.out.println("Method Name: " + methodName); } } catch (Exception e) { e.printStackTrace(); } } }


上一篇:
下一篇:
切换中文