Title: [1508] trunk/qdox/src/site/xhtml/usage.xhtml: We don't need the ClassLibrary anymore to prepare the structure, all can be done by the JavaProjectBuilder.
Revision
1508
Author
rfscholte
Date
2012-05-09 16:29:16 -0500 (Wed, 09 May 2012)

Log Message

We don't need the ClassLibrary anymore to prepare the structure, all can be done by the JavaProjectBuilder. Nice cleanup of page.

Modified Paths

Diff

Modified: trunk/qdox/src/site/xhtml/usage.xhtml (1507 => 1508)


--- trunk/qdox/src/site/xhtml/usage.xhtml	2012-05-09 21:22:33 UTC (rev 1507)
+++ trunk/qdox/src/site/xhtml/usage.xhtml	2012-05-09 21:29:16 UTC (rev 1508)
@@ -38,7 +38,7 @@
 		<h2>Resolving Class Names</h2>
 
 			<p>In order to resolve classes that have been imported using a wildcard (e.g. <code>import java.util.*;</code>), the
-			<code><a href=""
+			<code><a href=""
 			must be aware of other classes used in the project.</p>
 
 			<p>ClassLibrary has 4 ways to resolve classes:</p>
@@ -53,25 +53,22 @@
 			<p>All sources and sourcetrees added to the JavaProjectBuilder 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>
 
-            <p>The current classpath is automaticly set by JavaProjectBuilder. In most cases this shall be sufficient, however in some
+            <p>The current classpath is automatically set by JavaProjectBuilder. 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>
-
 <div class="Source Java"><pre>
 // Get the ClassLibrary
-ClassLibrary lib = builder.getClassLibrary();
+JavaProjectBuilder builder = new JavaProjectBuilder();
 
 // Add a sourcefolder;
-lib.addSourceFolder( new File( "src/main/java" ) );
-lib.addSourceFolder( new File( "target/generated-sources/foobar" ) );
+builder.addSourceFolder( new File( "src/main/java" ) );
+builder.addSourceFolder( new File( "target/generated-sources/foobar" ) );
 
 // Add a custom ClassLoader
-lib.addClassLoader( myCustomClassLoader );
+builder.addClassLoader( myCustomClassLoader );
 
 // Ant example : add the &lt;classpath&gt; element's contents
-lib.addClassLoader( new AntClassLoader( getProject(), classpath ) );
+builder.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