Java

$B%?%0%l%C%H$N35MW(J

 

$BL\

$B%?%0%l%C%H$N4pK\(J

$B%?%0%l%C%H$O!"(JJavaTM $B%W%m%0%i%_%s%08@8l$G5-=R$5$l$?%W%m%0%i%`$G$"$j!"
  • $B%?%0%l%C%H(J API $B%?%0%l%C%H$O!"%+%9%?%`%?%0$N%F%-%9%H0z?t$r=$>~$^$?$O%j%@%$%l%/%H$7$^$9!#(J $B$^$?!"%?%0%l%C%H$OI8=`%?%0$KBP$7%*!<%P!<%i%$%I$7$^$9!#(J

    $B%?%0%l%C%H$O!"(J-tag $B%*%W%7%g%s$NJQ-tag $B%*%W%7%g%s$r;HMQ$9$k$H!"(J@return $B$X@8@.$5$l$k$N$HN`;w$7$?%G%U%)%k%H(J HTML $B7A<0$r@8@.$7$^$9!#(J

    $B%?%0%l%C%H$r;HMQ$9$k$H!" $B%?%0%l%C%H$O!"$C$F:n@.$7!";HMQ$7$^$9!#(J

    1. $B%?%0%l%C%H$H$J$k(J Java $B%W%m%0%i%`$r5-=R$7$^$9!#(J $B%W%m%0%i%`$O import com.sun.tools.doclets.Taglet; // Taglet API import com.sun.javadoc.*; // Doclet API import java.util.Map; // Used in register(Map) toString(Tag) $B$G;HMQ$5$l$k(J Tag $B%$%s%?%U%'!<%9$O!"%I%C%/%l%C%H(J API $B$N0lIt$G$9!#(J

    2. $B%W%m%0%i%`$O public static void register(Map tagletMap)
    3. $B%I%C%/%l%C%H$r%3%s%Q%$%k$7$^$9!#(J $B%3%s%Q%$%k$K$O!"(JJava 2 SDK $B$K4^$^$l$k%3%s%Q%$%i(J javac $B$r;HMQ$G$-$^$9!#(J $BI,MW$J%/%i%9%U%!%$%k$O!"(JSDK $B$N(J lib/tools.jar $B%U%!%$%k$K4^$^$l$F$$$^$9!#(J ($B%?%0%l%C%H$r%3%s%Q%$%k$9$k$H$-!"(Jjavac $B$O(J tools.jar $B$r<+F0E*$KFI$_9~$_$^$9!#$7$?$,$C$F!"(J-classpath $B$r;H$C$F8!:w$9$kI,MW$O$"$j$^$;$s!#(J) $B:G=i$NNc$r<($7$^$9!#(J
         javac ToDoTaglet.java
      

    4. -taglet $B%*%W%7%g%s$*$h$S(J -tagletpath $B%*%W%7%g%s$r;HMQ$7$F(J javadoc $B%D!<%k$rcom.sun $B%Q%C%1!<%8Fb$K$"$k$HDj5A$5$l!"(J C:\bin\com\sun $B$K3JG<$5$l$F$$$k>l9g!"(JC:\bin $B$K(J tagletpath $B$r@_Dj$7$^$9!#(J $B$3$NNc$G$O!"(JToDoTaglet $B$r;HMQ$7$F!"(Jcom.package1 $B%Q%C%1!<%8$N(J javadoc $B$r8F$S=P$7$^$9!#(J
            javadoc -taglet ToDoTaglet -tagletpath C:\bin com.package1
      

    $B

    $BNc(J $BK%9%?%s%I%"%m%s%?%0%l%C%H(J

    @todo $B$r$B%9%?%s%I%"%m%s(J$B%?%0%l%C%H$N%=!<%9%3!<%I$NNc$O!"
  • ToDoTaglet.java $BBP1~$9$k%/%i%9%U%!%$%k$G$"$k(J ToDoTaglet.class $B$O!"$9$G$K%3%s%Q%$%k$5$l!"$3$N%=!<%9%U%!%$%k$HF1$8%G%#%l%/%H%jFb$KJ]B8$5$l$F$$$^$9!#(J

    $B$3$N%?%0%l%C%H$O!"(J@todo $B%?%0$N=PNO7A<0$r;XDj$7$^$9!#(J $B /** * @todo Fix this! */ $B

    To Do:
    Fix this!
  • $B $B%=!<%9%3!<%I$r8+$F$_$^$7$g$&!#(J $B%?%0$KL>A0$rIU$1!"%X%C%@%F%-%9%H$rDj5A$9$k$K$O!"(J2 $B$D$N(J private $B%U%#!<%k%I$rDj5A$7$^$9!#(J
        private String NAME = "todo";
        private String HEADER = "To Do:";
    
    $B%$%s%i%$%s%?%0$G$O$J$/%9%?%s%I%"%m%s%?%0$K$9$k$?$a!"(JisInlineTag $B$G(J false $B$rJV$9$h$&$K@_Dj$7$^$9!#(J
        public boolean isInlineTag() {
            return false;
        }
    
    inField$B!"(JinMethod$B!"(JinType$B!"(JinPackage$B!"(JinOverview $B$H$$$C$?B>$N%a%=%C%I$G$b!"(Jtrue $B$^$?$O(J false $B$r;XDj$7!"$3$N%?%0$,;HMQ$G$-$k%=!<%9%3!<%I$N%I%-%e%a%s%F!<%7%g%s%3%a%s%H$r<($7$^$9!#(J

    toString(Tag) $B%a%=%C%I$G$O!"(J1 $B$D$N(J {@todo} $B%?%0$KAx6x$7$?$H$-!"%F%-%9%H$r$I$N$h$&$K=PNO$KA^F~$9$k$+$r7hDj$7$^$9!#(J $B$3$N%3!<%I$O!"B@;z$N8+=P$7$N$"$H!"(Jtag.text() $B$G;XDj$5$l$?%F%-%9%H$r4^$`2+?'$NGX7J$NI=$r:n@.$7$^$9!#(J

        public String toString(Tag tag) {`
            return "<DT><B>" + HEADER + "</B><DD>"
                   + "<table cellpadding=2 cellspacing=0><tr><td bgcolor=\"yellow\">"
                   + tag.text()
                   + "</td></tr></table></DD>\n";
        }
    
    $BF1MM$K!"(JtoString(Tag) $B%a%=%C%I(J ($B%?%0$N(J 1 $BG[Ns$r{@todo} $B%?%0$KAx6x$7$?$H$-!"%F%-%9%H$r$I$N$h$&$K=PNO$KA^F~$9$k$+$r7hDj$7$^$9!#(J

    $BNc(J - $B%$%s%i%$%s%?%0%l%C%H(J

    $B%+%9%?%`(J$B%$%s%i%$%s(J$B%?%0$G$"$k%$%s%i%$%s%9%?%s%I%"%m%s%?%0$O!"%?%0%l%C%H$r;HMQ$7$F$N$_-tag $B%*%W%7%g%s$G$O {@underline} $B$r
  • UnderlineTaglet.java $BBP1~$9$k%/%i%9%U%!%$%k$G$"$k(J UnderlineTaglet.class $B$O!"$9$G$K%3%s%Q%$%k$5$l!"$3$N%=!<%9%U%!%$%k$HF1$8%G%#%l%/%H%jFb$KJ]B8$5$l$F$$$^$9!#(J

    $B$3$N%?%0%l%C%H$O!"(J{@underline} $B%?%0$N=PNO7A<0$r;XDj$7$^$9!#(J $B /** * Be sure to insert the value at the {@underline start} of the array. */ $B Be sure to insert the value at the start of the array.

  • $B $B$3$N%=!<%9%3!<%I(J ($B%$%s%i%$%s%?%0%l%C%H(J) $B$H!"A0=P$NNc(J ($B%9%?%s%H%"%m%s%?%0%l%C%H(J) $B$H$N0c$$$r8+$F$_$^$7$g$&!#(J $B$b$A$m$s!"%?%0L>$O0[$J$j!"%$%s%i%$%s%?%0$K$O%X%C%@$,$J$$$N$GDj5A$5$l$F$$$^$;$s!#(J
        private String NAME = "underline";
    
    $B%9%?%s%I%"%m%s%?%0$G$O$J$/%$%s%i%$%s%?%0$K$9$k$?$a!"(JisInlineTag $B$G(J true $B$rJV$9$h$&$K@_Dj$7$^$9!#(J
        public boolean isInlineTag() {
            return true;
        }
    

    inField$B!"(JinMethod$B!"(JinConstructor$B!"(JinType$B!"(JinPackage$B!"$*$h$S(J inOverview $B$H$$$C$?%a%=%C%I$O!"%9%?%s%I%"%m%s%?%0$K$N$_E,MQ$7$^$9!#$=$N$?$a!"%$%s%i%$%s%?%0$G$O$9$Y$F(J false $B$K@_Dj$9$kI,MW$,$"$j$^$9!#(J

    The toString(Tag) $B%a%=%C%I$G$O!"(J1$B$D$N(J {@underline} $B%?%0$KAx6x$7$?$H$-!"%F%-%9%H$r$I$N$h$&$K=PNO$KA^F~$9$k$+$r7hDj$7$^$9!#(J $B$3$N%3!<%I$O!"(JHTML $B2<@~%?%0(J <ul> $B$*$h$S(J </ul> $B$G%F%-%9%H$r0O$_$^$9!#(J

        public String toString(Tag tag) {
            return "<u>" + tag.text() + "</u>";
        }
    
    $B%9%?%s%I%"%m%s%?%0$N$h$&$K!"%$%s%?%$%s%?%0$N(J 1 $BG[Ns$rtoString(Tag[]) $B%a%=%C%I(J ($B%?%0$N(J 1 $BG[Ns$r

    $B%(%i!<$*$h$S7Y9p$N=hM}(J

    $B%(%i!<(J - $B%?%0%l%C%H$O!"%(%i!<%a%C%;!<%8$rI=<($7!"(JSystem.exit() $B$r8F$S=P$9$@$1$G!"%(%i!<$rJs9p$7!"(JJavadoc $B$rDd;_$G$-$^$9!#(J

    $B7Y9p(J - $B%?%0%l%C%H$O!"%I%C%/%l%C%H%$%s%9%?%s%9$G;XDj$5$l$?(J MessageRetriever $B$r;HMQ$7$F!"7Y9p$rJs9p$G$-$^$9!#(J MessageRetriever $B$O(J Configuration $B%*%V%8%'%/%H$+$il9g!"(JConfiguration $B$O(J static $B%a%=%C%I$G$"$k(J Standard.configuration() $B$r;HMQ$7$FSimpleTaglet $B$O$3$N$h$&$K$7$F7Y9p$rI=<($7$^$9!#$3$l$O(J -tag $B%*%W%7%g%s$N%G%U%)%k%H%?%0%l%C%H$G$9!#(J


    Copyright © 2001 Sun Microsystems, Inc. All Rights Reserved.

    $B%3%a%s%H$NAwIU@h(J: javadoc-tool@sun.com
    Sun