cp-tools-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Cp-tools-discuss] Re: Gjdoc now runs on full classpath tree


From: Julian Scheid
Subject: Re: [Cp-tools-discuss] Re: Gjdoc now runs on full classpath tree
Date: Fri, 10 May 2002 03:48:46 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc1) Gecko/20020417

Hmm, works fine at at my place. Perhaps a problem with Classpaths
java.text.BreakIterator? This is used to determine where the
first sentence ends, conforming to the Javadoc spec, like
this:

         BreakIterator boundary = 
BreakIterator.getSentenceInstance(Locale.ENGLISH);
         boundary.setText(new ArrayCharacterIterator(comment, rawDocStart));
         boundary.first();
         boundary.next();
         firstSentenceEnd = boundary.current();

... where rawDocStart points to the first asterisk _after_
the /** comment start tag.

Can you run it with a different BreakIterator implementation?
Or perhaps cut and paste the comment into a small test app
which checks if your BreakIterator does correctly determine
the end-of-sentence?

(BTW Javadoc 1.4 has some new clever approach that doesn't
use BreakIterator but some hand-crafted logic to deal with
nifty things like "J. R. Tolkien" -- but BreakIterator
should work quiet well for most cases.)

Julian


Mark Wielaard wrote:
Hi,

On Fri, 2002-05-10 at 02:51, Julian Scheid wrote:

Mark Wielaard wrote:

 - Sometimes the first sentence detection seems to fail.
   See the summary of java.util.TimerTask.cancel().

Can't reproduce that here. Please send a copy of your
java.util.TimerTask.xml.


Here you go.

I would have expected the fist sentence to be:
"Marks the task as canceled and prevents any further execution." And
noting more.

Cheers,

Mark


------------------------------------------------------------------------


 <gjdoc:classdoc xmlns="http://www.w3.org/TR/REC-html40"; 
xmlns:gjdoc="http://www.gnu.org/software/cp-tools/gjdocxml"; name="TimerTask" 
qualifiedtypename="java.util.TimerTask">
  <gjdoc:superclass typename="Object" qualifiedtypename="java.lang.Object"/>
  <gjdoc:implements typename="Runnable" qualifiedtypename="java.lang.Runnable"/>
  <gjdoc:isClass/>
  <gjdoc:isIncluded/>
  <gjdoc:inlineTags><![CDATA[ Task that can be run at a later time if given to 
a Timer.
 The TimerTask must implement a run method that will be called by the
 Timer when the task is scheduled for execution. ]]><![CDATA[The task can check 
when
 it should have been scheduled and cancel itself when no longer needed.
 <p>
 Example:
 <code>
  Timer timer = new Timer();
  TimerTask task = new TimerTask() {
      public void run() {
      if (this.scheduledExecutionTime() &lt; System.currentTimeMillis() + 500)
          // Do something
      else
          // Complain: We are more then half a second late!
      if (someStopCondition)
          this.cancel(); // This was our last execution
  };
  timer.scheduleAtFixedRate(task, 1000, 1000); // schedule every second
 </code>
 <p>
 Note that a TimerTask object is a one shot object and can only given once
 to a Timer. (The Timer will use the TimerTask object for bookkeeping,
 in this implementation).
 <p>
 This class also implements <code>Runnable</code> to make it possible to
 give a TimerTask directly as a target to a <code>Thread</code>.
]]></gjdoc:inlineTags>
  <gjdoc:firstSentenceTags><![CDATA[ Task that can be run at a later time if 
given to a Timer.
 The TimerTask must implement a run method that will be called by the
 Timer when the task is scheduled for execution. ]]></gjdoc:firstSentenceTags>
  <gjdoc:tags>
<gjdoc:tag kind="@see" name="@see"><![CDATA[Timer
]]></gjdoc:tag><gjdoc:tag kind="@since" name="@since"><![CDATA[1.3]]></gjdoc:tag><gjdoc:tag kind="@author" 
name="@author"><![CDATA[Mark Wielaard (address@hidden)]]></gjdoc:tag>  </gjdoc:tags>
  <gjdoc:seeTags>
<gjdoc:tag kind="@see" name="@see"><![CDATA[Timer
]]></gjdoc:tag>  </gjdoc:seeTags>
  <gjdoc:containingPackage name="java.util"/>
  <gjdoc:access scope="public"/>
  <gjdoc:isAbstract/>

  <gjdoc:constructordoc name="TimerTask">
   <gjdoc:isConstructor/>
   <gjdoc:isIncluded/>
   <gjdoc:inlineTags><![CDATA[ Creates a TimerTask and marks it as not yet 
scheduled.
]]></gjdoc:inlineTags>
   <gjdoc:firstSentenceTags><![CDATA[ Creates a TimerTask and marks it as not 
yet scheduled.
]]></gjdoc:firstSentenceTags>
   <gjdoc:containingPackage name="java.util"/>
   <gjdoc:containingClass typename="TimerTask" 
qualifiedtypename="java.util.TimerTask"/>
   <gjdoc:access scope="protected"/>
   <gjdoc:signature full="()" flat="()"/>
  </gjdoc:constructordoc>

  <gjdoc:methoddoc name="cancel">
   <gjdoc:isIncluded/>
   <gjdoc:isMethod/>
   <gjdoc:inlineTags><![CDATA[ Marks the task as canceled and prevents any 
further execution.
 Returns true if the task was scheduled for any execution in the future
 and this cancel operation prevents that execution from happening.
 <p>
 A task that has been canceled can never be scheduled again.
 <p>
 In this implementation the TimerTask it is possible that the Timer does
 keep a reference to the TimerTask until the first time the TimerTask
 is actually scheduled. ]]><![CDATA[But the reference will disappear immediatly 
when
 cancel is called from within the TimerTask run method.
]]></gjdoc:inlineTags>
   <gjdoc:firstSentenceTags><![CDATA[ Marks the task as canceled and prevents 
any further execution.
 Returns true if the task was scheduled for any execution in the future
 and this cancel operation prevents that execution from happening.
 <p>
 A task that has been canceled can never be scheduled again.
 <p>
 In this implementation the TimerTask it is possible that the Timer does
 keep a reference to the TimerTask until the first time the TimerTask
 is actually scheduled. ]]></gjdoc:firstSentenceTags>
   <gjdoc:containingPackage name="java.util"/>
   <gjdoc:containingClass typename="TimerTask" 
qualifiedtypename="java.util.TimerTask"/>
   <gjdoc:access scope="public"/>
   <gjdoc:signature full="()" flat="()"/>
   <gjdoc:returns typename="boolean" qualifiedtypename="boolean"/>
  </gjdoc:methoddoc>

  <gjdoc:methoddoc name="run">
   <gjdoc:isIncluded/>
   <gjdoc:isMethod/>
   <gjdoc:inlineTags><![CDATA[ Method that is called when this task is 
scheduled for execution.
]]></gjdoc:inlineTags>
   <gjdoc:firstSentenceTags><![CDATA[ Method that is called when this task is 
scheduled for execution.
]]></gjdoc:firstSentenceTags>
   <gjdoc:containingPackage name="java.util"/>
   <gjdoc:containingClass typename="TimerTask" 
qualifiedtypename="java.util.TimerTask"/>
   <gjdoc:access scope="public"/>
   <gjdoc:signature full="()" flat="()"/>
   <gjdoc:returns typename="void" qualifiedtypename="void"/>
  </gjdoc:methoddoc>

  <gjdoc:methoddoc name="scheduledExecutionTime">
   <gjdoc:isIncluded/>
   <gjdoc:isMethod/>
   <gjdoc:inlineTags><![CDATA[ Returns the last time this task was scheduled or 
(when called by the
 task from the run method) the time the current execution of the task
 was scheduled. ]]><![CDATA[When the task has not yet run the return value is
 undefined.
 <p>
 Can be used (when the task is scheduled at fixed rate) to see the
 difference between the requested schedule time and the actual time
 that can be found with <code>System.currentTimeMillis()</code>.
]]></gjdoc:inlineTags>
   <gjdoc:firstSentenceTags><![CDATA[ Returns the last time this task was 
scheduled or (when called by the
 task from the run method) the time the current execution of the task
 was scheduled. ]]></gjdoc:firstSentenceTags>
   <gjdoc:containingPackage name="java.util"/>
   <gjdoc:containingClass typename="TimerTask" 
qualifiedtypename="java.util.TimerTask"/>
   <gjdoc:access scope="public"/>
   <gjdoc:signature full="()" flat="()"/>
   <gjdoc:returns typename="long" qualifiedtypename="long"/>
  </gjdoc:methoddoc>
 </gjdoc:classdoc>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]