Javaã®getter/setterã®ã話ã
åã¯å½æãèªãã«ã¯è¥ãããã®ã ãã©ãéå»ãæ¯ãè¿ã£ã¦æ¸ãã¦ã¿ããå½æãç¥ã人ã¯èª¤ããããã°ææãã¦ã»ããããæ
å ±ãããã°ã³ã¡ã³ããªããã©ãã¯ããã¯ãªããã¦æ¬²ãããåä¸ç´ã®è©±ã¨ããã®ã¯ä»ã¨ãªã£ã¦ã¯æ¢ããã¨ããªããªãé£ãããªãã¤ã¤ããã
「privateな変数にpublicなアクセサを定義する」? - ネットの海の片隅で
getter/setterã¨ã¯ä½ã
Javaã®ãªãã¸ã§ã¯ãã«ãã£ã¼ã«ãããã£ãã¨ãã¦ããã®ãã£ã¼ã«ãã«å¤ãè¨å®ããã¡ã½ãããsetter(ãã£ãã¼)ããã®ãã£ã¼ã«ãã®å¤ãåå¾ããã¡ã½ãããgetter(ãã£ãã¼)ã¨å¼ã°ãããæ £ç¿ã¨ãã¦setterã¯setXXX(int value)ã¨ãã£ãæ§ã«setããå§ã¾ãååãã¤ããå¼æ°ã¯ã²ã¨ã¤ãæ»ãå¤ã¯voidåãgetterã¯getXXX()ã¨ãã£ãæ§ã«getããå§ã¾ãååãã¤ããå¼æ°ã¯ãªããæ»ãå¤ã§ãã£ã¼ã«ãã®å¤ãè¿ãã
public class Point { private int x; private int y; public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return y; } public void setY(int y) { this.y = y; } }
ç¹è¨äºé ã¨ãã¦ãç¹ã«booleanåã®ãã£ã¼ã«ãã«ã¤ãã¦ã¯getXXX()ã¨ãã£ãå称ã§ã¯ãªãisXXX()ã¨ãã£ãå称ãç¨ããããäºãããã
å é¨ã®ãã£ã¼ã«ãã¯privateã¢ã¯ã»ã¹ã¨ãã¦å¤ããç´æ¥ããããªãããã«ãã¤ã¤ãæä½ãã¡ã½ããçµç±ã§è¡ãã
æ´å²ççµç·¯
話ã¯åä¸ç´ãJava 1.0ã®é ã«é¡ãã1.0ã®é ã®æ¨æºAPIã§ã¯å½åè¦ç´ãå®ã¾ã£ã¦ããããæ¨æºAPIã§ããå°å ¥ããããã¼ã¸ã§ã³ãã1.0ã®ã¯ã©ã¹ã«ã¤ãã¦ã¯ã¨ããã©ãã(ç¾ä»£ããããã°)éåæã®ããã¡ã½ããã»ãã£ã¼ã«ãåããã¦ããã
1997å¹´2æã«Java 1.1ããªãªã¼ã¹ãããããã®æãããããä»ã®ããªãã¿ã®å½åè¦ç´ãå®ã¾ã£ããããã§è±èªã®åè©+åè©ã¨ãã£ãã¡ã½ããåãæ¨å¥¨ãããããã«ãªããgetter/setterã®å½åè¦ç´ãããã«ç«¯ãçºãã¦ããã¨æãã(ããåããã®ãããã®æ代ã®ãã¨ã¯ã¯ã£ããåãããªãã®ã§äºæ ãææ¡ãã¦ããããæ¹ãè³æã«ãããããæ¹ã¯æ å ±ãé ããã¨æé£ãã§ã)
getter/setterã®æ £ç¿ã«ã¤ãã¦ã¯JavaBeansä»æ§ã®å½±é¿ãããã¨ãã説ãå¼·ããJavaBeansã«ã¤ãã¦ã¯97å¹´å¾åã«ç»å ´ããã¨ããæ å ±ãããã*1ãJava1.1ã®javadocã«ã¯ãã§ã«java.beansããã±ã¼ã¸ãåå¨ãã¦ãããåå¾é¢ä¿ãããåãããªããå½æã®éèªã«ã§ãå½ãã£ãã»ããè¯ãããã§ããã
JavaBeansã¯GUIãªã©ã§åå©ç¨å¯è½ãªã³ã³ãã¼ãã³ããæä¾ããéã®è¦æ ¼ã®ãããªãã®ã§(åããã¾ã詳ãããªã)2000å¹´ãããã«GUIã®ã³ã³ãã¼ãã³ããä½ãã¨ãã«æèãããããªãã©ãã§ãããã£ããããªãã¤ãã¤ãæ©æµãå®æã§ããªãã£ã代ç©ã ã£ã(å½æã®åããããã ã説ããã:-)ã
ä½ã解決ãããã£ãã®ã
Java 1.0æ代ã®ãªãã¸ã§ã¯ãã¨ãã¦java.awt.Pointã«ç»å ´ãã¦ããããããã®Pointã¯ã©ã¹ã¯x,yã®åº§æ¨ãæã¤ã¯ã©ã¹ã§ãawtã¨ããåæã®Javaã®GUIã³ã³ãã¼ãã³ãã§å¤ç¨ããã¦ããã
å½æã®æ¨æºAPIã®ã½ã¼ã¹ã³ã¼ããæå ã«ãªãã®ã§ã¤ã¡ã¼ã¸ã§æ縮ã ããã ããã以ä¸ã®æ§ãªä½ãã«ãªã£ã¦ããã
public class Point { public int x; public int y; }
ãããpublicãã£ã¼ã«ãã使ã£ã¦ããã®ã§ããããªããJava 1.2ããã¯getX()ã¨getY()ã¡ã½ããã追å ã«ãªã£ã¦ãã:-P
private ãã£ã¼ã«ã + getter/setterã¨ããä½ãã§ãããããã¨ã®ã²ã¨ã¤ã¯ãèªã¿åãå°ç¨ã®ãªãã¸ã§ã¯ããä½ããã¨ã ã£ããpublic ãã£ã¼ã«ãã®å ´åãèªã¿æ¸ããèªç±ã§ãããããprotected ãã£ã¼ã«ã + getterã®ã¿ã¨ããæ§æã§èªã¿åãå°ç¨ãªã¯ã©ã¹ãä½ããã¨ãããããã¦ããããç¶æ¿ãã¦æ¸ãè¾¼ã¿ãå¯è½ãªã¯ã©ã¹ãä½ãã®ã§ããã
public class ReadOnlyPoint { protected int x; protected int y; public ReadOnlyPoint(int x, int y) { this.x = x; this.y = y; } public int getX() { return x; } public int getY() { return y; } } public class ReadWritePoint extends ReadOnlyPoint { public ReadWritePoint(int x, int y) { super(x, y); } public void setX(int x) { this.x = x; } public void setY(int y) { this.y = y; } }
ReadOnlyPoint ãç¶æ¿ã㦠ReadWritePoint ãä½ãã¨ãããã¨ã¯å¥å¦ã«æãããããããªãï¼å¥å¦ã«æããªãã®ã§ããã°Javaã®ãªãã¸ã§ã¯ãæåã®ä¸çã«é å¿ãã¦ãã:-ï¼ãããããJavaã®ãªãã¸ã§ã¯ãæåã«ç½®ããç¶æ¿ã¯ãç¶æ¿ããæ©è½ããã¹ã¦åã¯ã©ã¹å´ã§ãæä¾ããªããã°ãªããªããèªã¿æ¸ããã§ãã ReadWritePoint ã親ã«ã㦠èªã¿åãå°ç¨ã® ReadOnlyPoint ãä½ã£ãå ´åãsetXã¨setYã®æ©è½ãåä¾å´ã§æ½°ãå¿ è¦ãåºã¦ãããããã¯Javaã®ãªãã¸ã§ã¯ãæåã®ã«ã¼ã«ã«åããã
ReadWritePoint extends ReadOnlyPointã§ãããããèªã¿æ¸ãã§ããReadWritePointã®ã¤ã³ã¹ã¿ã³ã¹ãèªã¿è¾¼ã¿å°ç¨ã®ReadOnlyPointåã®å¤æ°ã«ä»£å ¥ãããã¨ãã§ãããããã¦èªã¿è¾¼ã¿å°ç¨ã¨ãã¦æ±ããã¨ãã§ãããããããéã¯æãç«ããªãã(ãã®ä¸ãã¯æ£ç¢ºãã«æ¬ ãããåã·ã¹ãã ãçºéããåã®æ代ã®ç©ºæ°æã ã¨æã£ã¦ããããããã§èªãã§ããã ããã)
ç¾ä»£ã§ã¯immutable(ãã¿ã ã¼ãã¶ã)ã¨ããææ³ãåºã¾ã£ã¦ããããåä¸ç´ã®ãããJavaçéã§immutableã¨ããè¨èãèããã¨ã¯ãã¾ããªãã£ãããã«æããgetter/setterã§ãããããã¨ã®ã²ã¨ã¤ã¯ãã®immutableã ã£ãã
å½æã®è²§å¼±ãªéçºç°å¢ã§ã¯ã¡ã½ããããã£ã¼ã«ãã®åç §å ãæ¢ãã¨ãããã¨ã¯å°é£ã§ãã£ããæ´æ°ãããã¹ãã§ã¯ãªããã£ã¼ã«ããæ´æ°ããã¦ããã¨ãã¦åç §å ãæ¢ãã¦ãã°ãæ½°ãã¨ããã®ã¯å®¹æã§ã¯ãªãã£ãã®ã ããã£ã¼ã«ãåãè¤éã§ååãéè¤ããªããã°åç´ãªããã¹ãæ¤ç´¢ã§ãããç¨åº¦åè£ã¯çµãè¾¼ããã ãããããã§ãä»£å ¥ã¨åç §ãåãã¦æ¤ç´¢ãããã¨ã¯é£ããã®ã ããå¾ãã調ã¹ããã¨ãã§ããªãããããé²è¡çã«getter/setterãã³ã³ããã¼ã«ãããã£ãããããªé¢¨ã«è¨æ¶ãã¦ããã
ãªããä½è«ã ããä¾ã«æããPointã¯ã©ã¹ã¯ãã£ã¼ã«ããããªããã£ãã®intåãªã®ã§åé¡ã«ãªããªããããããListã¨ãã£ããªãã¸ã§ã¯ãã ã¨å®å ¨ã«immutableã«ããã®ã¯é£ãããå®å ¨ãªimmutableãç®æãã¨ãªãã¸ã§ã¯ãã®çæã³ã¹ããé«ãã¤ãããããã®ã§ã»ã©ã»ã©ã®ã¨ããã§å¦¥åãããã¨ãå¤ãã(ãã®è©±é¡ã ãã§blogãã²ã¨ã¤æ¸ãã¦ãã¾ã)
ãªã¼ãã¼ã©ã¤ãã¸ã®å¸ç³
getter/setterã使ã£ãçç±ã¯ä»ã«ããã£ããããã¯ãå¾ã®æ¹å¤ã¸ã®åãããããã¯ãªã¼ãã¼ã©ã¤ãããããã¯ã¢ã¹ãã¯ãã®ã¦ã£ã¼ãã³ã°ã§ãã£ãã
ãããªãã¸ã§ã¯ãã®ç¶æ ãæ´æ°ãããç®æã«System.out.println()ãä»è¾¼ãã§å¤åããã°ã«åºãã¦ãããã°ãããã¨ã試ã¿ãã¨ããããpublicãã£ã¼ã«ãã¸ã®ã¢ã¯ã»ã¹ã«ã¯éä¸ã«å¦çãã¯ããä½å°ããªãããgetter/setterã«ãªã£ã¦ããã°ãã£ã¼ã«ãã¸ã®å¤ã®èªã¿æ¸ãã«éãã¦ä½ããã®å¦çãå·®ãæãä½å°ãçã¾ããã
ãï¼ãããªã®ã¯IDEã®ãããã¬ã§ç£è¦ããã°ãããããªããã£ã¦ï¼ã¾ã£ãããã®éãã§ããããã ããåä¸ç´ã«ãã®ãããªé«æ©è½ãªIDEã¨ãããåãããã¯ãã«ãªéçºæ©ãããã°ãã®è©±ã ã :-P
JDKä»å±ãã¼ã«ã®jdbã§ããã°ãã¨è¨ã話ãããããªããããã¾ãprintfãããã°(Javaã§ã¯å½æprintfã¡ã½ãããåå¨ããªãã:-)ãããããªãã§ããã¦ã»ããã
å½æã®éçºç°å¢ã¯è²§å¼±ã ã£ããããã¹ãã¨ãã£ã¿ã§Javaã®ã³ã¼ããæ¸ããã³ãã³ãããã³ããã§javacã³ãã³ããå©ãã¦éçºããããã¦ããã®ã ãç¾ä»£ã§ã¯ã¡ã½ããããã£ã¼ã«ãã®åç §å ã®æ¤ç´¢ã¨ããã®ã¯ç°¡åã«è¡ããã¨ãã§ãããããªãã¡ã¯ã¿ãªã³ã°æ©è½ã§å称ã®å¤æ´ãç°¡åã«ãã¤å®å ¨ã«è¡ããããå½æã¯ããã¯ãããªãã£ãã®ã§ããã
ãããªä¸ã§ãä½ããã£ãéã«å¦çãæ¸ãè¾¼ããä½å°ãä½ã£ã¦ããã¨ãããåããã«ã¯ååãªä¾¡å¤ããã£ãã
æ°æ§çã«éç£ãããgetter/setter
GUIã®ãã¼ããªã©ãè¨è¨ãããããªå ´åãããã¾ãå®ç´ãªgetter/setterãä½ããã¨ã¯å°ãªããããããªãããã£ã¼ã«ããpublicã«ãããã¨ããã¾ãããªããé©å½ã«å¤ããããããã¨çç¾ããç¶æ ã«é¥ããããããã ãç°å¸¸å¤ã¯setteræç¹ã§å¼¾ãããããã©ããã®å¤ã®æ´æ°ãããã°é£éçã«å¤æ´ãããã¨ãåºã¦ããããããä¾ãã°æ¨ªå¹ ãå¤ããã°æç»ããåã³ã³ãã¼ãã³ãã®æ¨ªå¹ ãããããå¤æ´ããªãã¨ãããªãã¨ã(ä¸è¬ã«ã¯ããããã¨ããã¯LayoutManagerããã£ã¦ããããã©ã:-)
ããããJava Servlet ãæµè¡ã£ã2000å¹´åå¾ã«ã¯ printfãããã°(Cè¨èªä»¥æ¥ã®å¤å¼ããããå称ã§æ¢ãã¦å¼ã¶:-)ã®å¸ç³ã¨ãã¦ãããã¦æå³ã®ãªãPOJO(Plain Old Java Object.ããã§ã¯åã«ãã¼ã¿ãæ ¼ç´ããã ãã®ãã£ã¼ã«ãã宣è¨ãããã ãã®ã¯ã©ã¹)ã«ãã¨ããããgetter/setterãä½ããããªé¢¨æ½®ã§ã¯ãã£ããåãä»æ§æ¸ã®Excelããgetter/setterãçæãããã¯ããæ¸ããã£ãã
å½æã®Servletã®éçºã§ã¯ãç»é¢ããServletã«HTTPãªã¯ã¨ã¹ããé£ã¶éã«ãã®å 容ãæ ¼ç´ããããã®POJOãä½ããServletããJSPã«ãã¼ã¿ãåã渡ãããããã®POJOãä½ããDBãåç §ããªãããã¼ã¿ã®è©°ãæ¿ãããã£ãã¨è¡ãã¢ã¯ã·ã§ã³ã»ã¯ã©ã¹ãå®è£ ãããã®ã ã£ããHTMLã¨ã®éã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ä»æ§æ¸ãDBã®ä»æ§æ¸ãJSPã¨ã®éã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ä»æ§æ¸ããããªã®ãçºããªãããã¼ã¿ãå³ããå·¦ã«è©°ãæ¿ããã³ã¼ããã¿ããªã§ãã£ãã¨æ¸ãã¦ããããã¯ãã¨ãã§ã°ã¼ã£ã¨èªåçæãã¦ãæä½æ¥ã¨åãã ãã®ãéãè²°ããã®ã§ããæå³ã§ã¯ããæ代ã ã£ãã®ãããããªã :-P
ãã®ããã«getter/setterã¯æ¸ããã®ã ãã¨ãã価å¤è¦³ãåºå®åããã¦ãã£ãããã«æãããã¬ã¼ã ã¯ã¼ã¯ãã¾ãgetter/setterã®ãããªãã¸ã§ã¯ããæ³å®ããä½ãã¨ãªã£ã¦ããã
é£ã®éãè
Javaããªãªã¼ã¹ããã1996å¹´å½æãMicrosoftã¯Javaé£å¶ã ã£ããMicrosoftãã¾ã次ä¸ä»£ã®éçºè¨èªã¨ãã¦ã®Javaãè¿åãã¦ããæ代ã§ãããããããMSã¯ã¡ãã£ã¨ããã¡ããéãããMSã«ã¨ã£ã¦ã®æ¬¡ä¸ä»£ã®éçºè¨èªã¨ãã¦ã®å©ä¾¿æ§ãæ±ããéæ¹é ãããã(J++/J#)ãWindowsçJavaã ãã§åããããªç´°å·¥ãããããJavaã®éçºå ã§ããã©ã¤ã»ã³ã¹å ã§ãã£ãSun microsystems(å½æãç¾å¨ã¯Oracle社ã¨ãªã£ã¦ãã)ã®æããè²·ã訴訟に発展ãã¦ããã
ãããªä¸ç´æ«ã®2000å¹´ã«C#/.NETãçã¾ããã®ã ã£ãã詳ããå æ ã¯ç¥ããªããåãããã¥ã¼ã¹ãè¦ã¦ããåãã®ç®ã«ã¯ãJavaã¯ã©ã¤ã»ã³ã¹ãã©ã¼ã®ã¨ããããã¼ããç¬èªã«ãããã¨ã«ãããï¼ã¨ãã風ã«è¦ãããDè¨èªã®ãããªãã¤ãã£ãã³ã³ãã¤ã«ããè¨èªã«ãªãã®ãã¨æããããJavaã®ãããªVMæ¹å¼ã®.NET Frameworkã ã£ãã®ã¯åã«ã¯æå¤ã«æããã
C#ã¯å½åããããããã£æ§æãæã£ã¦ãããgetter/setterã®ã¸ã§ãã¬ã¼ã¿ã¼ã«å·¥å¤«ãåããã¦ããå½æãããããã£æ§æã¯éãèã®ããã«è¦ãããã®ã§ãããJavaã®ãªãªã¼ã¹å½æããã§ã«VBãªã©ã¯åå¨ãã¦ããããã ãJavaã¯ããããã£æ§æãçãè¾¼ã¾ãªãã£ããè¨èªãã·ã³ãã«ã«ãããã£ãã®ãããããªãã
ããããã£æ§æã«ã¤ãã¦ã¯ä»ã§ã欲ãã人ã¯å¤ãã®ã§ã¯ãªãããããC#ã«ã¨ã£ã¦ã¯åæãã¼ã¸ã§ã³ããã®å°å ¥ã ãJavaã«ã¨ã£ã¦ã¯éä¸ããã®å°å ¥ã¨ãããã¨ã«ãªããã¯ã©ã¹ã«ã¡ã½ããã¨ãã£ã¼ã«ãã®ã»ãã«è¦ç´ ã追å ãããã¨ãªãã¨ããªãã¬ã¯ã·ã§ã³å¨ãã§ã®äºææ§ã«å¤§ããªå±æ§ãããã®ãäºå®ãå çºã§ãã£ãJavaã¯ããããã£æ§æãå°å ¥ããã¿ã¤ãã³ã°ããªãã®ãããããªãã
ç¾ä»£ã®è©ä¾¡
IDEã®çºéããç¾ä»£ãgetter/setterã¯ãã£ã¼ã«ã宣è¨ããç°¡åã«çæã§ããããã«ãªã£ãããããã¾ãéã«ãIDEãçºéããããããgetter/setterãå¿ è¦ã¨ããªããªãã¤ã¤ãããã
対å¤åãã®APIã©ã¤ãã©ãªã§ããã°ããã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ãä¿®æ£ããå ´åã®å½±é¿ã¯ã¦ã¼ã¶æ°ã«å¿ãã¦å¤§ããªãã®ã«ãªããããããç°¡åã«ä¿®æ£ãããã¨ã¯ã§ããªããå¿ è¦ã«ãªã£ã¦ããå¿ è¦ãªå½¢ã«ãªãã¡ã¯ã¿ãªã³ã°ããã°ããã®ã ããã¨ãã£ãã¹ã¿ã³ã¹ã§ã¯ããããäºåã«æ³å®ãã¦å¤çã¨ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ãå®ããå¿ è¦ãããã
ããããå 製ã®ã½ããã¦ã§ã¢ã«ã¤ãã¦è¨ãã°ãå¿ è¦ã«ãªã£ã¦ããç´ãã°ããã¨è¨ãã¦ãã¾ããæ代ã§ããããããã°ã¯ãã¡ããã®ãã¨ããã£ã¼ã«ããã¡ã½ããã®åç §å ã容æã«æ¤ç´¢ãããã¨ãã§ãããããªãã¡ã¯ã¿ãªã³ã°ãã¼ã«ãå å®ãããä¿®æ£ã®ã³ã¹ãã¯å°ãªããªã¹ã¯ãä½ãããããã¨ããã¨ãã«åãã¦ãgetter/setterãç¨æãã¦ããã¨ããè¡çºã«ããããæ義ãè¦åºããªããªãã¤ã¤ããã
immutableã®å®ç¾ã«é¢ãã¦ã¯getter/setterã«å¯¾ããããããã£æ§æãã©ããããã¨ããè°è«ãããé¢æ°åè¨èªã«ãããä¸å¤ãã¼ã¿åããµãã¼ããã¦ããçãªè°è«ã主æµã ããã
çµå±ã®ã¨ãããç¾ä»£ã«ããã¦getter/setterãç¨æããçç±ã¨ããã®ãããã¬ã¼ã ã¯ã¼ã¯ãããããå½¢ç¶ã®ãªãã¸ã§ã¯ããæ±ãããããã«ãªã£ã¦ãã¾ã£ã¦ããããã«æããããã¡ãããpublicãã£ã¼ã«ãã§ããã¾ããããã³ã°ãã¦ããããããªãã¬ã¼ã ã¯ã¼ã¯ãããããgetter/setterã§ããå¿ è¦ããããã¬ã¼ã ã¯ã¼ã¯ããããæ¥åã·ã¹ãã ã§ã¯å¤ãã®ãã¬ã¼ã ã¯ã¼ã¯ãç¨ãããXMLãJSONã¨ãã£ããã¼ã¿ã¨ã®ãããã³ã°ãHTTPãªã¯ã¨ã¹ãã¨ã®ãããã³ã°ãO/Rãããã¼ã®ããã«DBã¨ã®ããã¨ãã§ããããã³ã°ãçºçããã
ãã¤ã¦ã¯ãããããããã³ã°ãæä½æ¥ããã¯ãã§ã®çæã«é ¼ã£ã¦è¨è¿°ãã¦ããããã ããããããããã°ã©ãã³ã°ã«ãããåç´ä½æ¥ã¯ã»ã¨ãã©ããã¬ã¼ã ã¯ã¼ã¯ã«ãã£ã¦ãªãããæ代ã«ãªã£ããgetter/setterã®è¨è¿°ãIDEã«ãã£ã¦å®¹æã«è¡ããããããããå¿ è¦ãªãããããªããã¨æããæ代ã§ãããã
ãããç¾ä»£ãåæã«ã㦠getter/setterメソッドを使わなければならない10の理由 ãçºãã¦ã¿ãããããã«åæããã¦ããçç±ããããããç¾ä»£ãåæã¨ããå ´åã«å¼±ããªã£ã¦ãããã¨ãæãåãããã ãããéã«å¤ä»£ãåæã¨ãããªãã°ãããååãªåæ©ä»ãã«ãªã£ãã ãããã¨ãæãåããã®ã§ã¯ãªãã ãããã
getter/setterã¯å¤ãããã°ã©ãã³ã°ã¹ã¿ã¤ã«ã®ã²ã¨ã¤ã®è±¡å¾´ãããããªãããããããããæ¨ã¦å»ãã«ã¯ããããããªãããããã®ããèããå¿ è¦ãããããªããã§ã³ã¹ãç«ã£ã¦ããã®ããç¥ããã¨ã§åãã¦ãã§ã³ã¹ãæ¤å»ãã決æãä¸ãããæ ¹æ ããªããã§ã³ã¹ã®ä¸ã«é£ã³è¾¼ãã®ã¯è®åã§ãããªãã
ãã¾ã
äºæ
ã許ããªãLombokã試ãã¦ã¿ãã®ãè¯ããããããªãã
ãããã¯Groovyã®ãããªJavaVMä¸ã§åãå¥ã®è¨èªãç¨ããã®ãè¯ããããããªãã
ãã¡ãããå¤ãã®å ´åãäºæ ã許ããªããã¨ãåãã£ã¦ããã
10/13追è¨
JavaBeansã«ã¤ãã¦æ å ±ãããã ããã®ã§è¨è¼ãã¦ããã