用于在 Java 中删除注释的脚本 [英] Script to remove comments in Java

查看:28
本文介绍了用于在 Java 中删除注释的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何(或处理)在构建时从 Java 类文件中删除注释?当使用 Ant 构建项目时,我想对项目中的特定包执行此操作.任何 ANT 脚本或一些自定义代码最受欢迎.

Does anyone know how (or process) to remove comments from Java class file at build time? i would like to do this for specific packages in the project when the project is build using Ant. Any ANT scripts or some custom code most welcome.

推荐答案

编译后的 .class 文件中没有注释.

There are no comments in the compiled .class file.

这篇关于用于在 Java 中删除注释的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆