Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Javaプロジェクトのさまざまなパッケージに分散されたいくつかのクラスがあり、1つ以上の属性が対応するゲッターとセッターです。属性の名前を変更してプレフィックスを含める必要があります。たとえば、変数がある場合
private String one;
に変更したい
private String m_one;
また、対応するゲッターとセッターを変更する必要があります。ここでの制約は、これをant-scriptsで変更する必要があるということです。
どんな助けでも大歓迎です。
以下のAntコードを使用して、JavaファイルのJava変数を置き換えることができます。
<replaceregexp match="one" replace="m_one" flags="g" byline="true"> <fileset dir="${src.dir}" includes="**/*.java"/> </replaceregexp>