You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by le...@apache.org on 2004/03/03 22:53:18 UTC

cvs commit: jakarta-commons-sandbox/attributes/api/src/java overview.html

leosutic    2004/03/03 13:53:17

  Modified:    attributes/api/src/java overview.html
  Log:
  Improved documentation.
  
  Revision  Changes    Path
  1.6       +29 -5     jakarta-commons-sandbox/attributes/api/src/java/overview.html
  
  Index: overview.html
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/api/src/java/overview.html,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- overview.html	19 Feb 2004 14:49:12 -0000	1.5
  +++ overview.html	3 Mar 2004 21:53:17 -0000	1.6
  @@ -19,9 +19,21 @@
       <body>
           <p>The Jakarta Commons Attributes projects enables developers to use C#-like attributes in their programs.</p>
           
  +        <h2>Tutorial</h2>
  +        
  +        <ul>
  +            <li><p><a href="#what_does_it_do">What does it do for me?</a></p></li>
  +            <li><p><a href="#how_do_i_use_it_with_maven">How do I use it with Maven?</a></p></li>
  +            <li><p><a href="#how_do_i_use_it_with_ant">How do I use it with Ant?</a></p></li>
  +            <li><p><a href=""></a></p></li>
  +            <li><p><a href=""></a></p></li>
  +            <li><p><a href=""></a></p></li>
  +        </ul>
  +        
  +        <a name="what_does_it_do"/>
           <h3>What does it do for me?</h3>
           
  -        <p>The Jakarta Commons Attributes project allows you to add objects, called attributes, to your
  +        <p>The Jakarta Commons Attributes project allows you to add value objects, called attributes, to your
           classes, methods and fields:</p>
           
           <blockquote><pre>public class MyAttribute {}
  @@ -67,6 +79,7 @@
    */
   public class MyClass { }</pre></blockquote>
           
  +    <a name="how_do_i_use_it_with_maven"/>
           <h3>How do I use it with Maven?</h3>
           
           <p>Two steps: First, install the plugin. Your sources will be automatically precompiled. 
  @@ -78,6 +91,7 @@
       &lt;version&gt;SNAPSHOT&lt;/version&gt;
   &lt;/dependency&gt;</pre></blockquote>
           
  +        <a name="how_do_i_use_it_with_ant"/>
           <h3>How do I use it with Ant?</h3>
           
           <p>The Attributes project provides a precompiler that you must run before you compile your Java
  @@ -99,7 +113,9 @@
                       +-----------------+
   </pre></blockquote>
           
  -        <p>Let's illustrate the above with a short tutorial. Create a new folder and place in it the following files:</p>
  +        <p>Let's illustrate the above with a short tutorial. First, install the attribute compiler as
  +    described <a href="http://jakarta.apache.org/commons/sandbox/attributes/">here</a>. Then create a new 
  +    folder and place the following files in it:</p>
           
           <h4>build.xml</h4>
           
  @@ -107,7 +123,6 @@
       
       &lt;path id="build.classpath"&gt;
           &lt;pathelement path="commons-attributes-api-SNAPSHOT.jar"/&gt;
  -        &lt;pathelement path="commons-attributes-compiler-SNAPSHOT.jar"/&gt;
       &lt;/path&gt;
       
       &lt;taskdef name="attribute-compiler" 
  @@ -180,8 +195,8 @@
       
   }</pre></blockquote>
           
  -        <p>Place the two <tt>.jar</tt> files that the Attribute project consists of (<tt>commons-attributes-api-SNAPSHOT.jar</tt> 
  -        <tt>commons-attributes-compiler-SNAPSHOT.jar</tt>) in the directory. Then compile everything with:</p>
  +        <p>Place the client api <tt>.jar</tt> file (<tt>commons-attributes-api-SNAPSHOT.jar</tt>)
  +        in the directory. Then compile everything with:</p>
           
           <blockquote><pre>C:\tutorial&gt;ant
   Buildfile: build.xml
  @@ -204,6 +219,15 @@
   BUILD SUCCESSFUL
   Total time: 3 seconds</pre></blockquote>
           
  +    <h3>How do I add attributes to my classes?</h3>
  +    
  +    <p>Attributes are added in Javadoc comments for classes, methods and fields. Each attribute
  +    expression is on the form:</p>
  +    
  +    <blockquote><pre>
  +        @@[<i>optional target expression</i>] <i>AttributeClass</i>(<i>constructor args</i> [ <i>optional named args</i> ])
  +    </pre></blockquote>
  +    
           <h3>How do I add attributes to parameters and return values?</h3>
           
           <p>Use the following syntax:</p>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org