Title: [711] trunk/qdox/src/site/content/usage.html: QDOX-203: updated usage documentation
Revision
711
Author
rfscholte
Date
2010-03-09 04:52:28 -0600 (Tue, 09 Mar 2010)

Log Message

QDOX-203: updated usage documentation

Modified Paths

Diff

Modified: trunk/qdox/src/site/content/usage.html (710 => 711)

--- trunk/qdox/src/site/content/usage.html	2010-03-08 21:58:28 UTC (rev 710)
+++ trunk/qdox/src/site/content/usage.html	2010-03-09 10:52:28 UTC (rev 711)
@@ -21,7 +21,7 @@
 
 			<p>Java source code can then be added to the
 			<code><a href=""
-			Source can either beread one file at a time (using a java.io.Reader) or an entire source tree
+			Source can either be read one file at a time (using a java.io.Reader) or an entire source tree
 			can be added recursively.</p>
 
 <div class="Source Java"><pre>
@@ -41,17 +41,21 @@
 			<code><a href=""
 			must be aware of other classes used in the project.</p>
 
-			<p>ClassLibrary has 3 ways to resolve classes:</p>
+			<p>ClassLibrary has 4 ways to resolve classes:</p>
 
 			<p><ul>
 				<li>By looking at other sources that have been added.</li>
+				<li>By searching through the supplied sourceFolders</li>
 				<li>By looking in the current classpath (including the standard JRE classes).</li>
 				<li>By looking at additional ClassLoaders specified at runtime.</li>
 			</ul></p>
 
-			<p>The first two are automaticly set by JavaDocBuilder. In most cases this shall be sufficient, however in some
-			situations you may want resolve the full classes in external libraries.</p>
+			<p>All sources and sourcetrees added to the JavaDocBuilder will be parsed. This is often much more than required. 
+			To increase efficiency use the ClassLibrary to add sourcefolders. Consider these files as lazy parsed sources.
 
+            <p>The current classpath is automaticly set by JavaDocBuilder. In most cases this shall be sufficient, however in some
+            situations you may want resolve the full classes in external libraries.</p>
+
 			<p>To resolve classes from different ClassLoaders (e.g. 3rd party Jar files), the
 			<code>addClassLoader()</code> method must be called on the ClassLibrary.</p>
 
@@ -59,11 +63,15 @@
 // Get the ClassLibrary
 ClassLibrary lib = builder.getClassLibrary();
 
+// Add a sourcefolder;
+lib.addSourceFolder( new File( "src/main/java" ) );
+lib.addSourceFolder( new File( "target/generated-sources/foobar" ) );
+
 // Add a custom ClassLoader
-lib.addClassLoader(myCustomClassLoader);
+lib.addClassLoader( myCustomClassLoader );
 
 // Ant example : add the &lt;classpath&gt; element's contents
-lib.addClassLoader(new AntClassLoader(getProject(), classpath));
+lib.addClassLoader( new AntClassLoader( getProject(), classpath ) );
 </pre></div>
 
 			<p>It is important that additional ClassLoaders are added before any source files are parsed.</p>


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to