継承だろJK

783 views
722 views

Published on

Cross Community Conference 2008のjava-ja LT大会でテンプレートの継承について話した時のスライドです。

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
783
On SlideShare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

継承だろJK

  1. 1. 107/60
  2. 2. 100%
  3. 3. public class JavaEngineer { public class JavaJaEngineer {   public String () {   pubilc String () {     return " " + " ";     return " " + " ";   }   }   public int () {   public int () {     return 9;     return 13;   }   }   public int () {   public int () {     return 24 - ();     return 24 - ;   }   } // // } }
  4. 4. public class JavaEngineer { public class JavaJaEngineer {   public String () {   pubilc String () {     return " " + " ";     return " " + " ";   }   }   public int () {   public int () {     return 9;     return 13;   }   }   public int () {   public int () {     return 24 - ();     return 24 - ;   }   } // // } }
  5. 5. public abstract class Engineer extends Human {   public String () { return " "; }   public abstract int ();   public int () { return 24 - (); } } public class JavaEngineer public class JavaJaEngineer extends Engineer { extends Engineer {   public String () {   public String () {     return super. () + " ";     return super. () + " ";   }   }   public int () {   public int () {     return 9;     return 13;   }   } } }
  6. 6. public class Engineer {   public ;  public ;  public ;   public String ( ) { return (); }   public int ( ) { return (); }   public int ( ) { return (); }   // } Engineer javaEngineer = new Engineer(); javaEngineer. = JavaEngineer ; javaEngineer. = JavaEngineer ; javaEngineer. = Engineer ; Engineer javaJaEngineer = new Engineer(); javaEngineer. = JavaJaEngineer ; javaEngineer. = JavaJaEngineer ; javaEngineer. = Engineer ;
  7. 7. public class Engineer {   public ;  public ;  public ;   public String ( ) { return (); }   public int ( ) { return (); }   public int ( ) { return (); }   // } return " " Engineer javaEngineer = new Engineer(); + " "; javaEngineer. = JavaEngineer ; javaEngineer. = JavaEngineer ; javaEngineer. = Engineer ; return " " Engineer javaJaEngineer = new Engineer(); + " "; javaEngineer. = JavaJaEngineer ; javaEngineer. = JavaJaEngineer ; javaEngineer. = Engineer ;
  8. 8. public class Engineer {   public ;  public ;  public ;   public String ( ) { return (); }   public int ( ) { return (); }   public int ( ) { return (); }   // } return " " Engineer javaEngineer = new Engineer(); + " "; javaEngineer. = JavaEngineer ; javaEngineer. = JavaEngineer ; javaEngineer. = Engineer ; return " " Engineer javaJaEngineer = new Engineer(); + " "; javaEngineer. = JavaJaEngineer ; javaEngineer. = JavaJaEngineer ; javaEngineer. = Engineer ;
  9. 9. <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja"> <%@ page contentType="text/html; charset=UTF-8" %> <HEAD> <TITLE><%= title %></TITLE> <jsp:include page=”common_css.jsp” /> <jsp:include page=”common_js.jsp” /> <link href="other_style.css" rel="stylesheet" type="text/css" /> <BODY onload=”init();”> <div id=”header”> <jsp:include page="header.jsp" /> </div> <div id=”sidebar”> <jsp: include page=”sidebar.jsp” /></div> <div id=”content”> <jsp:include page="engineer_content.jsp" /> </div> </BODY> </HTML>
  10. 10. <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja"> <%@ page contentType="text/html; charset=UTF-8" %> <HEAD> <TITLE><%= title %></TITLE> <jsp:include page=”common_css.jsp” /> <jsp:include page=”common_js.jsp” /> <link href="other_style.css" rel="stylesheet" type="text/css" /> <BODY onload=”init();”> <div id=”header”> <jsp:include page="header.jsp" /> </div> <div id=”sidebar”> <jsp: include page=”sidebar.jsp” /></div> <div id=”content”> <jsp:include page="engineer_content.jsp" /> </div> </BODY> </HTML>
  11. 11.   <html>     <head>{% block title %} {% endblock title %}</head> <script type="text/javascript" src="common.js"></script> {% block custom_js %}{% endblock custom_js %}     <body>     <div id="menu">{% block menu %}{% endblock menu %}</div>     <div id="content">{% block content %}{% endblock content %}</div> <div id=”copyright”>{% block copyright %}everes{% endblock %}</div>     </body>   </html>   {% extends 'base.html% %}   {% block title %}{{ block.super }} {% endblock title %}   {% block menu %} {% endblock menu %}   {% extends 'app/base.html' %}   {% block content %} {% endblock content %}
  12. 12.   <html>     <head>{% block title %} {% endblock title %}</head> <script type="text/javascript" src="common.js"></script> {% block custom_js %}{% endblock custom_js %}     <body>     <div id="menu">{% block menu %}{% endblock menu %}</div>     <div id="content">{% block content %}{% endblock content %}</div> <div id=”copyright”>{% block copyright %}everes{% endblock %}</div>     </body>   </html>   {% extends 'base.html% %}   {% block title %}{{ block.super }} {% endblock title %}   {% block menu %} {% endblock menu %}   {% extends 'app/base.html' %}   {% block content %} {% endblock content %}
  13. 13.   <html>     <head>{% block title %} {% endblock title %}</head> <script type="text/javascript" src="common.js"></script> {% block custom_js %}{% endblock custom_js %}     <body>     <div id="menu">{% block menu %}{% endblock menu %}</div>     <div id="content">{% block content %}{% endblock content %}</div> <div id=”copyright”>{% block copyright %}everes{% endblock %}</div>     </body>   </html>   {% extends 'base.html% %}   {% block title %}{{ block.super }} {% endblock title %}   {% block menu %} {% endblock menu %}   {% extends 'app/base.html' %}   {% block content %} {% endblock content %}
  14. 14. _ | ● ● Java . | __ __ … | ´ . | } … . } / | | | )

×