Eclipse の [ソース]-[SetterおよびGetterの生成] で setter/getter を作ると、Checkstyle に怒られるコードができるのが嫌だ*1
package com.snail.example; /** * Example Bean. * * @author $author$ * @version $Revision$ */ public class ExampleBean { /** ABC. */ private int pAbc; /** DEF. */ private int pDef; }
package com.snail.example; /** * Example Bean. * * @author $author$ * @version $Revision$ */ public class ExampleBean { /** ABC. */ private int pAbc; /** DEF. */ private int pDef; /** * @return the abc */ public final int getAbc() { return pAbc; } /** * @param abc the abc to set */ public final void setAbc(int abc) { pAbc = abc; } /** * @return the def */ public final int getDef() { return pDef; } /** * @param def the def to set */ public final void setDef(int def) { pDef = def; } }
package com.snail.example; /** * Example Bean. * * @author $author$ * @version $Revision$ */ public class ExampleBean { /** ABC. */ private int pAbc; /** DEF. */ private int pDef; /** * @return the abc */ public final int getAbc() { return pAbc; } /** * @param abc the abc to set */ public final void setAbc(final int abc) { pAbc = abc; } /** * @return the def */ public final int getDef() { return pDef; } /** * @param def the def to set */ public final void setDef(final int def) { pDef = def; } }