commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosu...@apache.org
Subject cvs commit: jakarta-commons-sandbox/attributes/xdocs index.xml navigation.xml usage.xml usecases.xml
Date Wed, 20 Aug 2003 23:16:16 GMT
leosutic    2003/08/20 16:16:16

  Modified:    attributes LICENSE.txt maven.xml project.xml
  Added:       attributes/api project.xml
               attributes/api/src/java overview.html
               attributes/api/src/java/org/apache/commons/attributes
                        DefaultCachedRepository.java
                        EmptyCachedRepository.java Indexed.java
                        Inheritable.java package.html RepositoryError.java
                        Util.java
               attributes/compiler project.xml
               attributes/compiler/src/java/org/apache/commons/attributes/compiler
                        package.html
               attributes/site maven.xml project.properties project.xml
               attributes/site/etc site.jsl stylesheet.css
               attributes/site/xdocs index.xml navigation.xml
               attributes/unittest maven.xml project.xml
               attributes/unittest/src/cl1 TestAttribute.java
                        TestClass.java
               attributes/unittest/src/cl2 TestAttribute.java
                        TestClass.java
               attributes/unittest/src/test/org/apache/commons/attributes/test
                        Dependency.java Sample.java Sample2.java
                        SampleIF1.java SampleIF2.java SampleIFJoin.java
                        SampleService.java SuperSample.java ThreadSafe.java
  Removed:     attributes build.xml project.properties
               attributes/src/java/org/apache/commons/attributes
                        package.html
               attributes/src/java/org/apache/commons/attributes/impl
                        package.html
               attributes/src/java/org/apache/commons/attributes/task
                        package.html TagSet.java
               attributes/src/test/org/apache/commons/attributes/task
                        TagSetTest.java
               attributes/xdocs index.xml navigation.xml usage.xml
                        usecases.xml
  Log:
  Moving in, from Avalon Sandbox.
  
  Revision  Changes    Path
  1.2       +1 -5      jakarta-commons-sandbox/attributes/LICENSE.txt
  
  Index: LICENSE.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/LICENSE.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LICENSE.txt	14 Nov 2002 08:09:55 -0000	1.1
  +++ LICENSE.txt	20 Aug 2003 23:16:15 -0000	1.2
  @@ -1,13 +1,9 @@
   /*
  - * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  
  
  
  1.4       +80 -20    jakarta-commons-sandbox/attributes/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/maven.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- maven.xml	18 Dec 2002 19:00:40 -0000	1.3
  +++ maven.xml	20 Aug 2003 23:16:15 -0000	1.4
  @@ -1,21 +1,81 @@
  -<project default="java:jar" xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns:util="jelly:util">
  -
  -
  -  <goal name="test:run" prereqs="set.classpath" 
  -		description="Run a sample test case from the command line">
  -    <java classname="org.apache.commons.attributes.AttributesTest" fork="yes">
  -      <classpath refid="test.classpath"/>
  -    </java>
  -  </goal>
  -
  -  <goal name="set.classpath" prereqs="java:compile, test:compile">
  -    <path id="test.classpath">
  -      <pathelement path="target/classes"/>
  -      <pathelement path="target/test-classes"/>
  -      <pathelement path="${maven.build.dest}"/>
  -	  	<path refid="maven.dependency.classpath"/>
  -		</path>
  -	</goal>	
  -
  -
  +<project default="do-install" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
  +    
  +    <property file="${basedir}/../build.properties"/>
  +    <property file="${basedir}/../project.properties"/>
  +    <property file="project.properties"/>
  +    <property name="maven.jar.manifest.extensions.add" value="true"/>
  +    <property name="maven.checkstyle.format" value="avalon"/>
  +    <property name="pom.organization.identifier" value="ASF"/>
  +    <property name="pom.specificationVersion" value="1.0"/>
  +    
  +    <goal name="do-install" 
  +        description="Build the Jakarta Commons Attributes distribution." >
  +        <maven:reactor
  +            basedir="${basedir}"
  +            includes="api/project.xml"
  +            goals="jar:install-snapshot"
  +            banner="Building:"
  +            ignoreFailures="false" />
  +        
  +        <maven:reactor
  +            basedir="${basedir}"
  +            includes="compiler/project.xml"
  +            goals="jar:install-snapshot"
  +            banner="Building:"
  +            ignoreFailures="false" />
  +        
  +        <maven:reactor
  +            basedir="${basedir}"
  +            includes="unittest/project.xml"
  +            goals="wrapper"
  +            banner="Building:"
  +            ignoreFailures="false" />
  +        
  +        
  +    </goal>
  +    
  +    <goal name="do-clean" prereqs="clean">
  +        <maven:reactor
  +            basedir="${basedir}"
  +            includes="*/project.xml"
  +            excludes="site/*"
  +            goals="clean:clean"
  +            banner="Cleaning subproject:"
  +            ignoreFailures="false"/>
  +    </goal>
  +    
  +    <goal name="do-site">
  +        <maven:reactor
  +            basedir="${basedir}"
  +            includes="site/project.xml"
  +            goals="license,xjavadoc,site"
  +            banner="Building Site:"
  +            ignoreFailures="false" />
  +    </goal>
  +    
  +    <goal name="xjavadoc">
  +        <mkdir dir="${basedir}/target/docs/api" />
  +        <property name="copyright"
  +            value="Copyright &amp;copy; ${year} ${pom.organization.name}. All Rights Reserved." />
  +        <property name="title" value="${pom.name} ${pom.currentVersion} API"/>
  +        <javadoc destdir="${basedir}/target/docs/api" 
  +            doctitle="&lt;h1&gt;Jakarta Commons Attributes&lt;/h1&gt;" 
  +            noindex="false" author="true" use="true"
  +            windowtitle="${title}" 
  +            bottom="${copyright}"
  +            additionalparam="-breakiterator -J-Xmx128m "
  +            packagenames="*,org.*"
  +            overview="${basedir}/../api/src/java/overview.html">
  +            <j:forEach var="packageGroup" items="${pom.packageGroups}">
  +                <group title="${packageGroup.title}" packages="${packageGroup.packages}"/>
  +            </j:forEach>
  +            <sourcepath path="${basedir}/../api/src/java"/>
  +            <sourcepath path="${basedir}/../compiler/src/java"/>
  +            <classpath>
  +                <path refid="maven.dependency.classpath"/>
  +            </classpath>
  +            <link href="${sun.j2se.link}" />
  +        </javadoc>
  +    </goal>
  +    
   </project>
  
  
  
  1.5       +135 -155  jakarta-commons-sandbox/attributes/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/attributes/project.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- project.xml	18 Dec 2002 19:00:40 -0000	1.4
  +++ project.xml	20 Aug 2003 23:16:15 -0000	1.5
  @@ -1,156 +1,136 @@
  -<?xml version="1.0"?>
  -<project>
  -  <pomVersion>3</pomVersion>
  -  <name>Commons Attributes</name>
  -  <id>commons-attributes</id>
  -  <currentVersion>0.1</currentVersion>
  -
  -  <organization>
  -    <name>Apache Software Foundation</name>
  -    <url>http://www.apache.org</url>
  -    <logo>/images/jakarta-logo-blue.gif</logo>
  -  </organization>
  -
  -<!--
  -  <logo>/images/logo.gif</logo>
  --->
  -
  -  <inceptionYear>2002</inceptionYear>
  -  <package>org.apache.commons.attributes</package>
  -
  -  <shortDescription>Provides runtime access to Java metadata attributes.</shortDescription>
  -
  -  <description>
  -    Provides runtime access to Java metadata attributes.
  -  </description>
  -
  -  <url>http://jakarta.apache.org/commons/sandbox/attributes/</url>
  -  <issueTrackingUrl>http://jira.werken.com/BrowseProject.jspa?id=10061</issueTrackingUrl>
  -  <siteAddress>jakarta.apache.org</siteAddress>
  -  <siteDirectory>/www/jakarta.apache.org/commons/sandbox/attributes/</siteDirectory>
  -  <distributionDirectory>/www/jakarta.apache.org/builds/jakarta-commons-sandbox/attributes/</distributionDirectory>
  -  <repository>
  -    <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:jakarta-commons-sandbox/attributes</connection>
  -    <url>http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/attributes/</url>
  -  </repository>
  -  
  -  <versions>
  -    <version>
  -      <id>1.0-beta-1</id>
  -      <name>1.0-beta-1</name>
  -      <tag>1.0-beta-1</tag>
  -    </version>
  -  </versions>
  -  <branches></branches>
  -  
  -  <mailingLists>
  -    <mailingList>
  -      <name>Commons Dev List</name>
  -      <subscribe>commons-dev-subscribe@jakarta.apache.org</subscribe>
  -      <unsubscribe>commons-dev-unsubscribe@jakarta.apache.org</unsubscribe>
  -      <archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=commons-dev@jakarta.apache.org</archive>
  -    </mailingList>
  -    <mailingList>
  -      <name>Commons User List</name>
  -      <subscribe>commons-user-subscribe@jakarta.apache.org</subscribe>
  -      <unsubscribe>commons-user-unsubscribe@jakarta.apache.org</unsubscribe>
  -      <archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=commons-user@jakarta.apache.org</archive>
  -    </mailingList>
  -  </mailingLists>
  -  
  -  <developers>
  -    <developer>
  -      <name>Jon Tirsen</name>
  -      <id>tirsen</id>
  -      <email>tirsen@users.sourceforge.net</email>
  -      <organization>Lecando AB</organization>
  -    </developer>
  -
  -    <developer>
  -      <name>James Strachan</name>
  -      <id>jstrachan</id>
  -      <email>jstrachan@apache.org</email>
  -      <organization>SpiritSoft, Inc.</organization>
  -    </developer>
  -
  -    <developer>
  -      <name>Ara Abrahamian</name>
  -      <id>ara</id>
  -      <email>ara_e_w@yahoo.com</email>
  -      <organization></organization>
  -    </developer>
  -  </developers>
  -
  -  <dependencies>
  -
  -    <dependency>
  -      <id>qdox</id>
  -      <version>1.1</version>
  -    </dependency>
  -
  -    <dependency>
  -      <id>commons-logging</id>
  -      <version>1.0.2</version>
  -    </dependency>
  -
  -    <dependency>
  -      <id>ant</id>
  -      <version>1.5</version>
  -    </dependency>
  +<?xml version="1.0" encoding="ISO-8859-1"?>
   
  -	<!-- the following ultimately shouldn't be required once Maven can work without them -->
  -    <dependency>
  -      <id>junit</id>
  -      <version>3.8.1</version>
  -    </dependency>
  -
  -    <dependency>
  -      <id>xml-apis</id>
  -      <version>1.0.b2</version>
  -    </dependency>
  -
  -    <dependency>
  -      <id>xerces</id>
  -      <version>2.0.2</version>
  -    </dependency>
  -
  -  </dependencies>
  -
  -  <build>
  -
  -    <nagEmailAddress>commons-dev@jakarta.apache.org</nagEmailAddress>
  -
  -    <sourceDirectory>src/java</sourceDirectory>
  -
  -    <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
  -
  -    <!-- Unit test classes -->
  -
  -    <unitTest>
  -      <includes>
  -        <include>**/*Test.java</include>
  -      </includes>
  -      <excludes>
  -        <exclude>**/Abstract*.java</exclude>
  -      </excludes>
  -      <resources>
  -        <resource>
  -          <directory>src/test</directory>
  -          <includes>
  -            <include>**/*.xml</include>
  -            <include>**/*.properties</include>
  -          </includes>
  -        </resource>
  -      </resources>
  -    </unitTest>
  -
  -
  -    <resources>
  -      <directory>src/java</directory>
  -      <includes>
  -        <include>**/*.xml</include>
  -      </includes>
  -    </resources>
  -
  -  </build>
  -</project>
  \ No newline at end of file
  +<project>
  +    
  +    <pomVersion>3</pomVersion>
  +    <groupId>jakarta-commons-attributes</groupId>
  +    <name>Jakarta Commons Attributes</name>
  +    
  +    <organization>
  +        <name>Apache Software Foundation</name>
  +        <url>http://jakarta.apache.org/</url>
  +        <logo>http://jakarta.apache.org/images/jakarta-logo.gif</logo>
  +    </organization>
  +    
  +    <inceptionYear>2003</inceptionYear>
  +    
  +    <package></package>
  +    <gumpRepositoryId>jakarta-commons-sandbox</gumpRepositoryId>
  +    
  +    <url>http://jakarta.apache.org/commons/sandbox/attributes/index.html</url>
  +    <issueTrackingUrl>http://nagoya.apache.org/</issueTrackingUrl>
  +    
  +    <siteAddress>jakarta.apache.org</siteAddress>
  +    <siteDirectory>${root.site.directory}/commons/sandbox/attributes</siteDirectory>
  +    <distributionDirectory></distributionDirectory>
  +    
  +    <repository>
  +        <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:jakarta-commons-sandbox/attributes</connection>
  +        <url>http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/attributes/</url>
  +    </repository>
  +    
  +    <mailingLists>
  +        <mailingList>
  +            <name>Jakarta Commons Developer List</name>
  +            <subscribe>commons-dev-subscribe@jakarta.apache.org</subscribe>
  +            <unsubscribe>commons-dev-unsubscribe@jakarta.apache.org</unsubscribe>
  +            <archive>http://nagoya.apache.org/eyebrowse/SummarizeList?listName=commons-dev@jakarta.apache.org</archive>
  +        </mailingList>
  +    </mailingLists>
  +    
  +    <developers>
  +        <developer>
  +            <name>Leo Sutic</name>
  +            <id>leosutic</id>
  +            <email>leosutic@apache.org</email>
  +            <organization>Inspire Infrastructure</organization>
  +            <roles>
  +                <role>All of them.</role>
  +            </roles>
  +        </developer>
  +    </developers>
  +    
  +    <contributors>
  +    </contributors>
  +    
  +    <build>
  +        
  +        <nagEmailAddress>commons-dev@jakarta.apache.org</nagEmailAddress>
  +        <sourceDirectory>${basedir}/src/java</sourceDirectory>
  +        <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
  +        <integrationUnitTestSourceDirectory/>
  +        <aspectSourceDirectory/>
  +        
  +        <unitTest>
  +            <includes>
  +                <include>**/*TestCase*</include>
  +            </includes>
  +            <excludes>
  +                <exclude>**/Abstract*</exclude>
  +            </excludes>
  +            <resources>
  +                <resource>
  +                    <directory>${basedir}/src/test</directory>
  +                    <includes> 
  +                        <include>**/*.dtd</include>
  +                        <include>**/*.properties</include>
  +                        <include>**/*.xinfo</include>
  +                        <include>**/*.xtype</include>
  +                        <include>**/*.xprofile</include>
  +                        <include>**/*.xconfig</include>
  +                        <include>**/*.xml</include>
  +                        <include>**/*.xservice</include>
  +                        <include>**/*.mf</include>
  +                        <include>**/*.jar</include>
  +                    </includes>
  +                </resource>
  +                <resource>
  +                    <directory>${maven.conf.dir}</directory>
  +                    <includes> 
  +                        <include>**/*.properties</include>
  +                    </includes>
  +                </resource>
  +                <resource>
  +                    <directory>${basedir}/src/test/conf</directory>
  +                    <includes> 
  +                        <include>**/*</include>
  +                    </includes>
  +                </resource>
  +            </resources>
  +        </unitTest>
  +        
  +        <integrationUnitTestPatterns></integrationUnitTestPatterns>
  +        
  +        <resources>
  +            <resource>
  +                <directory>${basedir}/src/java</directory>
  +                <includes>
  +                    <include>**/*.dtd</include>
  +                    <include>**/*.properties</include>
  +                    <include>**/*.xinfo</include>
  +                    <include>**/*.xtype</include>
  +                    <include>**/*.xprofile</include>
  +                    <include>**/*.xconfig</include>
  +                    <include>**/*.xml</include>
  +                    <include>**/*.xservice</include>
  +                </includes>
  +            </resource>
  +            <resource>
  +                <directory>${basedir}/../</directory>
  +                <includes>
  +                    <include>LICENSE.txt</include>
  +                </includes>
  +            </resource>
  +            <resource>
  +                <directory>${maven.conf.dir}</directory>
  +                <targetPath>BLOCK-INF</targetPath>
  +                <includes>
  +                    <include>block.xml</include>
  +                </includes>
  +            </resource>
  +        </resources>
  +        
  +        <jars></jars>
  +    </build>
  +    
  +</project>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/api/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
      <extend>${basedir}/../project.xml</extend>
      <id>jakarta-commons-attributes-api</id>
      <name>Jakarta Commons Attribute Compiler API</name>
      <package>org.apache.commons.attributes</package>
      
      <currentVersion>0.1</currentVersion>
      <inceptionYear>2003</inceptionYear>
      <shortDescription>Client API for Jakarta Commons Attributes.</shortDescription>
      
      <description>
          A precompiler for java that enables the use of attributes as seen in C#.
      </description>
      
      <build>
          <unitTestSourceDirectory>${basedir}/target/temp</unitTestSourceDirectory>
      </build>
      
      <dependencies>
          <dependency>
              <groupId>ant</groupId>
              <artifactId>ant</artifactId>
              <version>1.5</version>
          </dependency>
          
          <dependency>
              <id>xdoclet+xjavadoc</id>
              <version>1.0</version>
          </dependency>
          
          <dependency>
              <id>commons-collections</id>
              <version>2.1</version>
          </dependency>
      </dependencies>
      
      <packageGroups>
          <packageGroup>
              <title>Application Program Interface (API)</title>
              <packages>org.apache.commons.attributes</packages>
          </packageGroup>
      </packageGroups>
      
  </project>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/api/src/java/overview.html
  
  Index: overview.html
  ===================================================================
  <html>
      <body>
          <p>The Jakarta Commons Attributes projects enables developers to use C#-like attributes in their programs.</p>
          
          <h3>What does it do for me?</h3>
          
          <p>The Jakarta Commons Attributes project allows you to add objects, called attributes, to your
          classes, methods and fields:</p>
          
          <blockquote><pre>public class MyAttribute {}
  
  /**
   * @@MyAttribute
   */
  public class MyClass { }</pre></blockquote>
          
          <p>These attributes can then be retrieved at runtime:</p>
          
          <blockquote><pre>Collection attrs = Attributes.getAttributes( MyClass.class );
  
  // Get the first object of the collection
  MyAttribute myAttr = (MyAttribute) attrs.iterator().next(); 
  </pre></blockquote>
          
          <p>Attributes can in turn contain values:</p>
          
          <blockquote><pre>public class Dependency {
  
      private final String name;
      private final Class dependencyClass;
  
      public Dependency( String name, Class dependencyClass ) {
          this.name = name;
          this.dependencyClass = dependencyClass;
      }
  
      public Class getDependencyClass() {
          return this.dependencyClass;
      }
  
      public String getName() {
          return this.name;
      }
  }</pre></blockquote>
          
          <p>This attribute can then be used like this:</p>
          
          <blockquote><pre>/**
   * @@Dependency( "dependency-name", SomeClass.class )
   */
  public class MyClass { }</pre></blockquote>
          
          <h3>How do I use it?</h3>
          
          <p>The Attributes project provides a precompiler that you must run before you compile your Java
          classes with Javac (or some other Java compiler). The process goes like this:</p>
          
  <blockquote><pre>
  +------------+                              +--------------------+
  |Java Sources|----&gt; Attribute Compiler ----&gt;|Generated Java Files|   
  +------------+                              +--------------------+
        |                                                 |
        |                                                 |
        |               +-------------+                   |
        +--------------&gt;|Java Compiler|&lt;------------------+
                        +-------------+
                               |
                               v
                      +-----------------+
                      |Java .class files|
                      +-----------------+
  </pre></blockquote>
          
          <p>Let's illustrate the above with a short tutorial. Create a new folder and place in it the following files:</p>
          
          <h4>build.xml</h4>
          
          <blockquote><pre>&lt;project name="jakarta-commons-attributes-demo" default="build" basedir="."&gt;
      
      &lt;path id="build.classpath"&gt;
          &lt;pathelement path="jakarta-commons-attributes-api-SNAPSHOT.jar"/&gt;
          &lt;pathelement path="jakarta-commons-attributes-compiler-SNAPSHOT.jar"/&gt;
      &lt;/path&gt;
      
      &lt;taskdef name="attribute-compiler" 
          classname="org.apache.commons.attributes.compiler.AttributeCompiler"&gt;
          &lt;classpath&gt;
              &lt;path refid="build.classpath"/&gt;
          &lt;/classpath&gt;
      &lt;/taskdef&gt;
      
      &lt;target name="build"&gt;
          &lt;attribute-compiler destDir="."&gt;
              &lt;fileset dir="." includes="*.java"/&gt;
          &lt;/attribute-compiler&gt;    
          
          &lt;javac srcdir="." 
              destdir="."
              target="1.3"&gt;
              &lt;classpath&gt;
                  &lt;path refid="build.classpath"/&gt;
              &lt;/classpath&gt;
          &lt;/javac&gt;
      &lt;/target&gt;
      
      &lt;target name="run"&gt;
          &lt;java fork="yes" classname="Main"&gt;
              &lt;classpath&gt;
                  &lt;path refid="build.classpath"/&gt;
                  &lt;pathelement path="."/&gt;
              &lt;/classpath&gt;
          &lt;/java&gt;
      &lt;/target&gt;
  &lt;/project&gt;</pre></blockquote>
          
          <h4>MyAttribute.java</h4>
          
          <blockquote><pre>public class MyAttribute {
      
      public final String value;
      
      public MyAttribute( String value ) {
          this.value = value;
      }
      
      public String getValue () {
          return value;
      }
      
      public String toString () {
          return "[MyAttribute: " + value + "]";
      }
      
  }</pre></blockquote>
          
          
          <h4>Main.java</h4>
          
          <blockquote><pre>import java.util.Collection;
  import org.apache.commons.attributes.Attributes;
  
  /**
   * @@MyAttribute( "A value" )
   */
  public class Main {
      
      public static void main (String[] args) {
          Collection attributes = Attributes.getAttributes ( Main.class );
          System.out.println ("The class Main has the following attributes:");
          System.out.println (attributes);
      }
      
  }</pre></blockquote>
          
          <p>Place the two <tt>.jar</tt> files that the Attribute project consists of (<tt>jakarta-commons-attributes-api-SNAPSHOT.jar</tt> 
          <tt>jakarta-commons-attributes-compiler-SNAPSHOT.jar</tt>) in the directory. Then compile everything with:</p>
          
          <blockquote><pre>C:\tutorial&gt;ant
  Buildfile: build.xml
  
  build:
      [javac] Compiling 3 source files to C:\tutorial
  
  BUILD SUCCESSFUL
  Total time: 8 seconds</pre></blockquote>
          
          <p>and run the small demo with:</p>
          
          <blockquote><pre>C:\tutorial&gt;ant run
  Buildfile: build.xml
  
  run:
       [java] The class Main has the following attributes:
       [java] [[MyAttribute: A value]]
  
  BUILD SUCCESSFUL
  Total time: 3 seconds</pre></blockquote>
          
          
          <h3>What happens if I add the same attribute twice?</h3>
          
          <p>Let's define the question a bit stricter. Suppose you have an attribute (MyAttribute), and you have a class MyClass:</p>
          
          <blockquote><pre>/**
   * @@MyAttribute
   * @@MyAttribute
   */
  public class MyClass {}</pre></blockquote>
          
          <p>The question is now, will the collection returned by Attributes.getAttributes (MyClass.class) have one or two elements? The answer is that it depends on the way MyAttribute handles equality. The attributes associated with a class, method or field always for a Set, meaning that there are no duplicates. So if MyAttribute is implemented this way:</p>
          
          <blockquote><pre>public class MyAttribute {}</pre></blockquote>
          
          <p>Then you will get two elements, since each instance of MyAttribute is different from every other instance. However, if MyAttribute is implemented like this:</p>
          
          <blockquote><pre>public class MyAttribute {
      public int hashCode () { return 0; }
      public boolean equals (Object o) { return o instanceof MyAttribute; }
  }</pre></blockquote>
          
          <p>That is, every instance of MyAttribute is equal to any other instance of the class, then you will only get one element in the collection.</p>
          
          <p>The above also holds true if the attribute has been inherited.</p>
          
          
          <h3>What syntax is preferred for attributes - <code>@AttributeName</code> or <code>@@AttributeName</code>?</h3>
          
          <p><code>@@AttributeName</code>, since this explicitely tells the compiler that this is an attribute, and eliminates a lot of guesswork.</p>
          
          
          <h3>What are the requirements for an attribute class?</h3>
          
          <p>It must have a public constructor. That's all.</p>
          
        
          
          <h3>I tried adding attributes to an anonymous class and it didn't work.</h3>
          
          <p>That's not supported (yet). It is also very hard to implement since the class name is decided by the Java compiler.</p>
          
          <h3>How do I add attributes to classes that are generated at runtime (BCEL, dynamic proxies)?</h3>
          
          <p>Not supported yet, but probably we'll supply a method like <code>Attributes.registerAttributes (Class clazz, AttributePackage package)</code> that you'll be able to call.</p>
          
          
          <h3>I want to add a constant value as an attribute.</h3>
          
          <p>So you have this</p>
          
          <blockquote><pre>public class Values {
      public static final Integer ONE = new Integer (1);
  }</pre></blockquote>
          
          <p>and now you'd like to add ONE as an attribute like this:</p>
          
          <blockquote><pre>/**
   * @@Values.ONE
   */
  public class MyClass { ... }</pre></blockquote>
          
          <p>how can this be done?</p>
          
          <p>The best that can be offered is:</p>
          
          <blockquote><pre>/**
   * @@Integer(Values.ONE)
   */
  public class MyClass { ... }</pre></blockquote>
          
          <p>I'm afraid. The expression follwing the @@ must fit the template "new (expression)" optionally suffixed by "()". This makes the compiler much simpler, and the loss of functionality was considered worth it. You can also define a separate ONE class:</p>
          
  <blockquote><pre>public class One {}</pre></blockquote>
          
          <p>and use it.</p>
          
      </body>
  </html>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/api/src/java/org/apache/commons/attributes/DefaultCachedRepository.java
  
  Index: DefaultCachedRepository.java
  ===================================================================
  package org.apache.commons.attributes;
  
  import java.lang.reflect.Field;
  import java.lang.reflect.Constructor;
  import java.lang.reflect.Method;
  import java.util.ArrayList;
  import java.util.Collection;
  import java.util.Iterator;
  import java.util.Map;
  import java.util.Set;
  import java.util.HashSet;
  import java.util.HashMap;
  
  class DefaultCachedRepository implements CachedRepository {
      
      private final static Collection EMPTY_COLLECTION = new ArrayList (0);
      
      private final Set classAttributes = new HashSet ();
      private final Map fields = new HashMap ();
      private final Map methods = new HashMap ();
      private final Map constructors = new HashMap ();
      
      public DefaultCachedRepository (Class clazz, AttributeRepositoryClass repo) {
          // ---- Fix up class attributes
          this.classAttributes.addAll (repo.getClassAttributes ());
          this.classAttributes.addAll (getInheritableClassAttributes (clazz.getSuperclass ()));
          Class[] ifs = clazz.getInterfaces ();
          for (int i = 0; i < ifs.length; i++) {
              this.classAttributes.addAll (getInheritableClassAttributes (ifs[i]));
          }
          
          // ---- Fix up method attributes
          Method[] methods = clazz.getDeclaredMethods ();
          for (int i = 0; i < methods.length; i++) {
              Method m = methods[i];
              String key = Util.getSignature (m);
              
              Set attributes = new HashSet ();
              
              if (repo.getMethodAttributes ().containsKey (key)) {
                  attributes.addAll ((Collection) repo.getMethodAttributes ().get (key));
              }
              attributes.addAll (getInheritableMethodAttributes (clazz.getSuperclass (), m.getName (), m.getParameterTypes ()));
              for (int j = 0; j < ifs.length; j++) {
                  attributes.addAll (getInheritableMethodAttributes (ifs[j], m.getName (), m.getParameterTypes ()));
              }
              
              if (attributes.size () > 0) {
                  this.methods.put (m, attributes);
              }
          }
          
          // --- Just copy constructor attributes (they aren't inherited)
          Constructor[] constructors = clazz.getDeclaredConstructors ();
          for (int i = 0; i < constructors.length; i++) {
              Constructor ctor = constructors[i];
              String key = Util.getSignature (ctor);
              
              if (repo.getConstructorAttributes ().containsKey (key)) {
                  this.constructors.put (ctor, repo.getConstructorAttributes ().get (key));
              }
          }
          
          // --- Just copy field attributes (they aren't inherited)
          Field[] fields = clazz.getDeclaredFields ();
          for (int i = 0; i < fields.length; i++) {
              Field f = fields[i];
              String key = f.getName ();
              if (repo.getFieldAttributes ().containsKey (key)) {
                  this.fields.put (f, repo.getFieldAttributes ().get (key));
              }
          }
      }
      
      private static Collection getInheritableAttributes (Collection attrs) {
          HashSet result = new HashSet ();
          
          Iterator iter = attrs.iterator ();
          while (iter.hasNext ()) {
              Object attr = iter.next ();
              if (Attributes.hasAttributeType (attr.getClass (), Inheritable.class)) {
                  result.add (attr);
              }
          }
          return result;
      }
      
      private static Collection getInheritableClassAttributes (Class c) {
          if (c == null) {
              return new ArrayList (0);
          }
          
          HashSet result = new HashSet ();
          result.addAll (getInheritableAttributes (Attributes.getAttributes (c)));
          
          // Traverse the class hierarchy
          result.addAll (getInheritableClassAttributes (c.getSuperclass ()));
          
          // Traverse the interface hierarchy
          Class[] ifs = c.getInterfaces ();
          for (int i = 0; i < ifs.length; i++) {
              result.addAll (getInheritableClassAttributes (ifs[i]));
          }
          
          return result;
      }
      
      private static Collection getInheritableMethodAttributes (Class c, String methodName, Class[] methodParams) {
          if (c == null) {
              return new ArrayList (0);
          }
          
          HashSet result = new HashSet ();
          
          try {
              // Get equivalent method in c
              Method m = c.getMethod (methodName, methodParams);
              if (m.getDeclaringClass () == c) {
                  result.addAll (getInheritableAttributes (Attributes.getAttributes (m)));
              }
          } catch (NoSuchMethodException nsme) {
          }
          
          // Traverse the class hierarchy
          result.addAll (getInheritableMethodAttributes (c.getSuperclass (), methodName, methodParams));
          
          // Traverse the interface hierarchy
          Class[] ifs = c.getInterfaces ();
          for (int i = 0; i < ifs.length; i++) {
              result.addAll (getInheritableMethodAttributes (ifs[i], methodName, methodParams));
          }
          
          return result;
      }
      
      public Collection getAttributes () {
          return classAttributes;
      }
      
      public Collection getAttributes (Field f) {
          if (fields.containsKey (f)) {
              return (Collection) fields.get (f);
          } else {
              return EMPTY_COLLECTION;
          }
          
      }
      
      public Collection getAttributes (Method m) {
          if (methods.containsKey (m)) {
              return (Collection) methods.get (m);
          } else {
              return EMPTY_COLLECTION;
          }
      }
      
      public Collection getAttributes (Constructor c) {
          if (constructors.containsKey (c)) {
              return (Collection) constructors.get (c);
          } else {
              return EMPTY_COLLECTION;
          }
      }   
  }
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/api/src/java/org/apache/commons/attributes/EmptyCachedRepository.java
  
  Index: EmptyCachedRepository.java
  ===================================================================
  package org.apache.commons.attributes;
  
  import java.lang.reflect.Field;
  import java.lang.reflect.Constructor;
  import java.lang.reflect.Method;
  import java.util.ArrayList;
  import java.util.Collection;
  
  /**
   * Null implementation of a cached repository.
   */
  class EmptyCachedRepository implements CachedRepository {
      
      private final static Collection EMPTY_COLLECTION = new ArrayList (0);
      
      public Collection getAttributes () {
          return EMPTY_COLLECTION;
      }
      
      public Collection getAttributes (Field f) {
          return EMPTY_COLLECTION;
      }
      
      public Collection getAttributes (Method m) {
          return EMPTY_COLLECTION;
      }
      
      public Collection getAttributes (Constructor c) {
          return EMPTY_COLLECTION;
      }
  }
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/api/src/java/org/apache/commons/attributes/Indexed.java
  
  Index: Indexed.java
  ===================================================================
  package org.apache.commons.attributes;
  
  /**
   * This attribute is used to mark attributes as being indexed.
   * Indexed attributes will result in the attribute-jar-index tool
   * creating an entry for a class marked with an attribute that is indexed.
   * For example, if the attribute Service is Indexed, and the classes
   * MyService and MyService2 have Service as a class attribute, the 
   * jar-index will be:
   *
   * AttributeType: Service
   * Class: MyService
   * Class: MyService2
   */
  public class Indexed {
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/api/src/java/org/apache/commons/attributes/Inheritable.java
  
  Index: Inheritable.java
  ===================================================================
  package org.apache.commons.attributes;
  
  /**
   * This attribute is used to mark attributes as being inheritable.
   * Inheritable attributes are inherited down the class and interface
   * hierarchy. See Dependency for an example of an inheritable attribute.
   */
  public class Inheritable {
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/api/src/java/org/apache/commons/attributes/package.html
  
  Index: package.html
  ===================================================================
  <html>
      <body>
          <p>Provides an API for accessing attributes.
      </body>
  </html>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/api/src/java/org/apache/commons/attributes/RepositoryError.java
  
  Index: RepositoryError.java
  ===================================================================
  package org.apache.commons.attributes;
  
  /**
   * Thrown when an attribute repository class can't be
   * loaded or instantiated.
   */
  public class RepositoryError extends Error {
     
      private final Throwable nested;
      
      public RepositoryError () {
          this (null, null);
      }
      
      public RepositoryError (String message) {
          this (message, null);
      }
      
      public RepositoryError (Throwable nested) {
          this (nested.toString(), nested);
      }
      
      public RepositoryError (String message, Throwable nested) {
          super (message);
          this.nested = nested;
      }
      
      public Throwable getNested () {
          return nested;
      }
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/api/src/java/org/apache/commons/attributes/Util.java
  
  Index: Util.java
  ===================================================================
  package org.apache.commons.attributes;
  
  import java.lang.reflect.Field;
  import java.lang.reflect.Constructor;
  import java.lang.reflect.Method;
  
  class Util {
      
      public static String getSignature (Method m) {
          return m.getName () + "(" + getParameterList (m.getParameterTypes ()) + ")";
      }
      
      public static String getSignature (Constructor c) {
          return "(" + getParameterList (c.getParameterTypes ()) + ")";
      }
      
      public static String decodedClassName (String rawName) throws IllegalArgumentException {
          if (!rawName.startsWith ("[")) {
              return rawName;
          } else {
              StringBuffer nesting = new StringBuffer ();
              int i = 0;
              while (rawName.charAt (i) == '[') {
                  nesting.append ("[]");
                  i++;
              }
              String type = "";
              switch (rawName.charAt (i)) {
              case 'B': type = "byte"; break;
              case 'C': type = "char"; break;
              case 'D': type = "double"; break;
              case 'F': type = "float"; break;
              case 'I': type = "int"; break;
              case 'J': type = "long"; break;
              case 'L': type = rawName.substring (i + 1, rawName.length () - 1); break;
              case 'S': type = "short"; break;
              case 'Z': type = "boolean"; break;
              default: throw new IllegalArgumentException ("Can't decode " + rawName);
              } 
              
              return type + nesting.toString ();
          }
      }
      
      public static String getParameterList (Class[] params) {
          StringBuffer sb = new StringBuffer ();
          for (int i = 0; i < params.length; i++) {
              if (i > 0) {
                  sb.append (",");
              }
              sb.append (decodedClassName (params[i].getName ()));                
          }
          return sb.toString ();
      }
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/compiler/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
      <extend>${basedir}/../project.xml</extend>
      <id>jakarta-commons-attributes-compiler</id>
      <name>Jakarta Commons Attribute Compiler Ant Task</name>
      <package>org.apache.commons.attributes.compiler</package>
      
      <currentVersion>0.1</currentVersion>
      <inceptionYear>2003</inceptionYear>
      <shortDescription>Attribute Compiler</shortDescription>
      
      <description>
          An Ant task that will precompile Java source.
      </description>
      
      <dependencies>
          <dependency>
              <groupId>ant</groupId>
              <artifactId>ant</artifactId>
              <version>1.5</version>
          </dependency>
          
          <dependency>
              <id>xdoclet+xjavadoc</id>
              <version>1.0</version>
          </dependency>
          
          <dependency>
              <groupId>jakarta-commons-attributes</groupId>
              <artifactId>jakarta-commons-attributes-api</artifactId>
              <version>SNAPSHOT</version>
          </dependency>
      </dependencies>
      
      <packageGroups>
          <packageGroup>
              <title>Compiler</title>
              <packages>org.apache.commons.attributes.compiler</packages>
          </packageGroup>
      </packageGroups>
      
  </project>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/compiler/src/java/org/apache/commons/attributes/compiler/package.html
  
  Index: package.html
  ===================================================================
  <html>
      <body>
          <p>Provides an Ant task that preprocesses Java files. The resulting files
          should then be compiled with the originals in order to enable attributes.
      </body>
  </html>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/site/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="site" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
  
    <property file="${basedir}/build.properties"/>
    <property file="${basedir}/project.properties"/>
  
    <property name="maven.license.licenseFile" 
      value="${basedir}/../LICENSE.txt"/>
    <property name="maven.javadoc.stylesheet" 
      value="${basedir}/etc/stylesheet.css"/>
  
    <preGoal name="site">
      <attainGoal name="license"/>
    </preGoal>
  
  </project>
  
  
  1.1                  jakarta-commons-sandbox/attributes/site/project.properties
  
  Index: project.properties
  ===================================================================
  
  #
  # Banner background and foreground colors.
  #
  
  maven.ui.banner.background = #fff
  maven.ui.banner.foreground = #000
  maven.xdoc.jsl = file:/${basedir}/etc/site.jsl
  maven.javadoc.stylesheet =${basedir}/etc/stylesheet.css
  
  #
  # Declaration of the remote links to assign on javadoc generation.
  # Link declarations can be overriden in the user's build.properties
  # file.
  #
  
  sun.j2se.link = http://java.sun.com/j2se/1.4/docs/api/
  maven.javadoc.links = ${sun.j2se.link}
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/site/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <project>
      <extend>${basedir}/../project.xml</extend>
      <package>org.apache.commons.attributes</package>
      
      <dependencies>
                 
          <dependency>
              <id>ant</id>
              <version>1.5</version>
          </dependency>
          <dependency>
              <id>qdox</id>
              <version>1.1</version>
          </dependency>
          
          <!-- pre JDK 1.4 dependencies -->
          
          <dependency>
              <id>xml-apis</id>
              <version>1.0.b2</version>
              <url>http://xml.apache.org/xerces2-j/</url>
          </dependency>
          <dependency>
              <id>xerces</id>
              <version>2.2.1</version>
              <url>http://xml.apache.org/xerces2-j/</url>
          </dependency>
          
      </dependencies>
      
      
      <packageGroups>
      </packageGroups>
      
      <reports>
          <report>maven-changelog-plugin</report>
          <report>maven-file-activity-plugin</report>
          <report>maven-developer-activity-plugin</report>
          <report>maven-changelog-plugin</report>
      </reports>
      
  </project>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/site/etc/site.jsl
  
  Index: site.jsl
  ===================================================================
  <?xml version="1.0"?>
  <!-- stylesheet to be used -->
  <jsl:stylesheet select="$doc"
    xmlns:define="jelly:define"
    xmlns:j="jelly:core"
    xmlns:jsl="jelly:jsl"
    xmlns:log="jelly:log"
    xmlns:util="jelly:util"
    xmlns:x="jelly:xml"
    xmlns:doc="doc"
    xmlns="dummy" trim="false">
    <jsl:template match="document" trim="false">
  
      <x:doctype name="html"
        publicId="-//CollabNet//DTD XHTML 1.0 Transitional//EN"
        systemId="http://www.collabnet.com/dtds/collabnet_transitional_10.dtd"/>
  
      <html>
        <head>
          <j:set var="docTitle">
            <x:expr select="./properties/title"/>
          </j:set>
          <x:if select="$nav/title">
            <title>
              <x:expr select="$nav/title"/> - ${docTitle}
            </title>
          </x:if>
          <x:if select="not($nav/title)">
            <title>${pom.name} - ${docTitle}</title>
          </x:if>
          <j:set var="tigrisCss" value='"${relativePath}/style/tigris.css"'/>
          <j:set var="mavenCss" value='"${relativePath}/style/maven.css"'/>
          <j:set var="osmCss" value='"${relativePath}/style/osm.css"'/>
          <style type="text/css"><![CDATA[
            @import url(${tigrisCss});
            @import url(${mavenCss});
            @import url(${osmCss});
          ]]></style>
          <!-- FIXME: once someone works out how to stop this breaking
          <x:element name="script"><x:attribute name="type">text/javascript</x:attribute>
            if (document.layers) {
                  document.writeln(''+
                  '<link rel="stylesheet" type="text/css" href="${relativePath}/style/ns4_only.css" media="screen" /><link rel="stylesheet" type="text/css" href="${relativePath}/style/maven_ns4_only.css" media="screen"/>');
                }
              </x:element>
          -->
          <link rel="stylesheet" type="text/css" href="${relativePath}/style/print.css" media="print"/>
          <x:forEach var="author" select="./properties/author">
            <meta name="author" value="${author.text}"/>
            <meta name="email" value="${author.attribute('email').value}"/>
          </x:forEach>
        </head>
  
        <body class="composite" marginwidth="0" marginheight="0">
          <div id="banner">
            <table border="0" cellspacing="0" cellpadding="8" width="100%" height="103">
              <tr>
                <!-- organization logo -->
                <td>
                  <j:set var="logo" value="${pom.organization.logo}"/>
                  <j:if test="${!empty(logo)}">
                    <!-- set url to org or project url -->
                    <j:set var="url" value="${pom.organization.url}"/>
                    <j:if test="${!empty(url)}">
                      <j:set var="home" value="${pom.organization.url}"/>
                    </j:if>
                    <j:if test="${empty(url)}">
                      <j:set var="home" value="${pom.url}"/>
                    </j:if>
                    <!-- set image to relative or complete -->
                    <j:set var="image" value="${pom.organization.logo}"/>
                    <j:if test="${!image.startsWith('http://')}">
                      <j:set var="image" value="${relativePath}${image}"/>
                    </j:if>
                    <a href="${home}">
                      <img src="${image}" align="left" alt="${pom.organization.name}" border="0"/>
                    </a>
                  </j:if>
                </td>
  
                <!-- project logo and link -->
                <td>
                  <div align="right" id="login">
                    <j:set var="logo" value="${pom.logo}"/>
                    <j:if test="${logo != null and logo != ''}">
                      <!-- set image to relative or complete -->
                      <j:set var="image" value="${pom.logo}"/>
                      <j:if test="${!image.startsWith('http://')}">
                        <j:set var="image" value="${relativePath}${image}"/>
                      </j:if>
  
                      <a href="${pom.url}">
                        <img src="${image}" align="right" alt="${pom.name}" border="0"/>
                      </a>
                    </j:if>
                  </div>
                </td>
              </tr>
            </table>
          </div>
  
          <div id="breadcrumbs">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr>
                <j:if test="${date == 'left'}">
                  <j:set var="version" value="${maven.xdoc.version}"/>
                  <td>Last published: ${build.date}
                    <j:if test="${!empty(version)}">| Doc for ${version}</j:if>
                  </td>
                </j:if>
                <td>
                  <div align="right">
                    <j:if test="${date == 'right'}">
                      Last published: ${build.date}
                      <x:if select="$nav/body/links">|</x:if>
                    </j:if>
                    <!-- render links -->
                    <x:if select="$nav/body/links">
                      <jsl:applyTemplates select="$nav/body/links"/>
                    </x:if>
                    <x:if select="not($nav/body/links)">
                      <!-- FIXME &nbsp; -->
                    </x:if>
                  </div>
                </td>
              </tr>
            </table>
          </div>
  
          <!-- Body of the page -->
          <table border="0" cellspacing="0" cellpadding="8" width="100%"> <!--id="main" -->
            <tr valign="top">
              <td id="leftcol" width="200">
                <div id="navcolumn">
                  <j:if test="${context.findVariable('maven.xdoc.date') == 'navigation-top'}">
                    <div>
                      <small>Last published: ${buildDate}</small>
                    </div>
                  </j:if>
  
                  <x:if select="$nav">
                    <jsl:applyTemplates select="$nav/body/menu"/>
                  </x:if>
  
                  <!-- Standard Maven Navigation -->
                  <j:set var="fileName">${file}</j:set>
  
                  <!-- 
                   ! Check to see if the user wishes to include the
                   ! maven-generated docs on their site.
                   !-->
                  <j:if test="${includeProjectDocumentation.equals('yes')}">
                  <div>
                    <strong>Project Documentation</strong>
                    <!--
                    <div>
                      <small>
                        <a href="${relativePath}/index.html">Front Page</a>
                      </small>
                    </div>
                    -->
                    <div>
                      <small>
                        <a href="${relativePath}/project-info.html">Project Info</a>
                      </small>
                      <util:tokenize var="projectInfoFiles" delim=",">${maven.xdoc.projectInfo}</util:tokenize>
                      <j:forEach var="infoFile" items="${projectInfoFiles}">
                        <j:if test="${relativePath == '.' and fileName.endsWith(infoFile)}">
                          <div>
                            <small>
                              <a href="${relativePath}/mail-lists.html">Mailing Lists</a>
                            </small>
                          </div>
                          <div>
                            <small>
                              <a href="${relativePath}/team-list.html">Project Team</a>
                            </small>
                          </div>
                          <div>
                            <small>
                              <a href="${relativePath}/dependencies.html">Dependencies</a>
                            </small>
                          </div>
                          <j:if test="${!empty(pom.repository.url)}">
                            <div>
                              <small>
                                <a href="${relativePath}/cvs-usage.html">Source Repository</a>
                              </small>
                            </div>
                          </j:if>
                          <j:if test="${!empty(pom.issueTrackingUrl)}">
                            <div>
                              <small>
                                <a href="${relativePath}/issue-tracking.html">Issue Tracking</a>
                              </small>
                            </div>
                          </j:if>
                        </j:if>
                      </j:forEach>
                    </div>
                    <div>
                      <small>
                        <a href="${relativePath}/maven-reports.html">Project Reports</a>
                      </small>
                      <j:choose>
                        <j:when test="${!pom.reports.isEmpty()}">
                          <!--
                           | Check to see if we need to include the report
                           | links in this document.  The only time we
                           | need to do this is when the current document
                           | either the maven-reports.xml doc (the page
                           | is displayed when clicking on Project
                           | Reports) or when the current document is one
                           | of the actual reports (in which case we want
                           | to leave the project report links expanded.
                           |-->
                           <j:set var="includeReportLinks" value="false"/>
                           <j:forEach var="report" items="${reports}">
                             <j:set var="linkWithXmlExt" value="${report.link}.xml"/>
                             <j:if test="${relativePath == '.' and (fileName.endsWith('maven-reports.xml') or fileName.endsWith(linkWithXmlExt))}">
                              <j:set var="includeReportLinks" value="true"/>
                            </j:if>
                          </j:forEach>
                          <!--
                           | If we need to include the report links, then
                           | do so.  This is determined by the above
                           | block.
                           |-->
                          <j:if test="${includeReportLinks == 'true'}">
                            <j:forEach var="report" items="${reports}">
                              <div>
                                <small>
                                  <a href="${relativePath}/${report.link}.html">
                                    ${report.name}
                                  </a>
                                </small>
                              </div>
                            </j:forEach>
                          </j:if>
                        </j:when>
                        <j:otherwise>
                          <!-- The old static method -->
                          <util:tokenize var="projectReportFiles" delim=",">${maven.xdoc.projectReports}</util:tokenize>
                          <j:forEach var="reportFile" items="${projectReportFiles}">
                            <j:if test="${relativePath == '.' and fileName.endsWith(reportFile.trim())}">
                              <util:available file="${maven.docs.src}/tasks.xml">
                                <div>
                                  <small>
                                    <a href="${relativePath}/tasks.html">Tasks</a>
                                  </small>
                                </div>
                              </util:available>
                              <util:available file="${maven.gen.docs}/task-list.xml">
                                <div>
                                  <small>
                                    <a href="${relativePath}/task-list.html">Task List</a>
                                  </small>
                                </div>
                              </util:available>
                              <util:available file="${maven.docs.src}/changes.xml">
                                <div>
                                  <small>
                                    <a href="${relativePath}/changes.html">Changes</a>
                                  </small>
                                </div>
                              </util:available>
                              <j:if test="${!empty(pom.repository.connection)}">
                                <div>
                                  <small>
                                    <a href="${relativePath}/changelog-report.html">Change Log</a>
                                  </small>
                                </div>
                                <div>
                                  <small>
                                    <a href="${relativePath}/developer-activity-report.html">Developer Activity</a>
                                  </small>
                                </div>
                                <div>
                                  <small>
                                    <a href="${relativePath}/file-activity-report.html">File Activity</a>
                                  </small>
                                </div>
                              </j:if>
                              <j:if test="${unitTestSourcesPresent}">
                                <div>
                                  <small>
                                    <a href="${relativePath}/junit-report.html">Unit Tests</a>
                                  </small>
                                </div>
                              </j:if>
                              <j:if test="${sourcesPresent}">
                                <div>
                                  <small>
                                    <a href="${relativePath}/jdepend-report.html">Metric Results</a>
                                  </small>
                                </div>
                                <div>
                                  <small>
                                    <a href="${relativePath}/checkstyle-report.html">Checkstyle Report</a>
                                  </small>
                                </div>
                                <div>
                                  <small>
                                    <a href="${relativePath}/javadoc.html">Javadoc Report</a>
                                  </small>
                                </div>
                              </j:if>
                              <util:available file="${maven.docs.dest}/clover">
                                <div>
                                  <small>
                                    <a href="${relativePath}/clover/index.html">Clover Test Coverage</a>
                                  </small>
                                </div>
                              </util:available>
                              <util:available file="${maven.gen.docs}/cactus-report.xml">
                                <div>
                                  <small>
                                    <a href="${relativePath}/cactus-report.html">Cactus Tests</a>
                                  </small>
                                </div>
                              </util:available>
                            </j:if>
                          </j:forEach>
                        </j:otherwise>
                      </j:choose>
                    </div>
                    <j:if test="${pom.reports.isEmpty()}">
                      <j:if test="${sourcesPresent}">
                        <div>
                          <small>
                            <a href="${relativePath}/apidocs/index.html">JavaDocs</a>
                          </small>
                        </div>
                        <div>
                          <small>
                            <a href="${relativePath}/xref/index.html">Source XReference</a>
                          </small>
                        </div>
                        <j:if test="${unitTestSourcesPresent == 'true'}">
                          <div>
                            <small>
                              <a href="${relativePath}/xref-test/index.html">Test XReference</a>
                            </small>
                          </div>
                        </j:if>
                      </j:if>
                    </j:if>
                    <!--
                    <j:set var="devProcess" value="false"/>
                    <util:available file="${maven.docs.src}/development-process.xml">
                      <j:set var="devProcess" value="true"/>
                    </util:available>
                    <j:if test="${devProcess}">
                      <div>
                        <small>
                          <a href="${relativePath}/development-process.html">Development Process</a>
                        </small>
                      </div>
                    </j:if>
                    <j:if test="${!devProcess}">
                      <div>
                        <small>
                          <j:set var="devProcess">${maven.xdoc.developmentProcessUrl}</j:set>
                          <a href="${devProcess}">Development Process</a>
                        </small>
                      </div>
                    </j:if>
                    -->
                    <div>
                      <small>
                        <a href="${relativePath}/license.html">License</a>
                      </small>
                    </div>
                  </div>
                </j:if>
                  <j:if test="${context.findVariable('maven.xdoc.date') == 'navigation-bottom'}">
                    <div>
                      <small>Last published: ${build.date}</small>
                    </div>
                  </j:if>
                </div>
              </td>
              <td>
                <div id="bodycol">
                  <!-- Insert MAIN body here -->
                  <div class="app">
                    <!-- FIXME really shouldn't use $doc, but jelly loses it's context again -->
                    <jsl:applyTemplates select="$doc/document/body/section"/>
                    <jsl:applyTemplates select="$doc/document/body/glossary" />
                    <jsl:applyTemplates select="$doc/document/body/release" />
                    <jsl:applyTemplates select="$doc/document/body/changelog" />
                    <jsl:applyTemplates select="$doc/document/body/taskList" />
                    <jsl:applyTemplates select="$doc/document/body/goals" />
                  </div>
                </div>
              </td>
            </tr>
          </table>
          <div id="footer">
            <table border="0" cellspacing="0" cellpadding="4">
              <tr>
                <td>
                  <j:if test="${!empty(pom.organization.name)}">
                    <j:if test="${!empty(pom.inceptionYear)}">
                      <j:if test="${pom.inceptionYear == mavenCurrentYear}">
                        <!-- FIXME &copy; -->${mavenCurrentYear}, ${pom.organization.name}
                      </j:if>
                      <j:if test="${pom.inceptionYear != mavenCurrentYear}">
                        <!-- FIXME &copy; --> ${pom.inceptionYear}-${mavenCurrentYear}, ${pom.organization.name}
                      </j:if>
                    </j:if>
                    <j:if test="${empty(pom.inceptionYear)}">
                      <!-- FIXME &copy; --> ${mavenCurrentYear}, ${pom.organization.name}
                    </j:if>
                  </j:if>
  
                  <j:if test="${context.findVariable('maven.xdoc.date') == 'bottom'}">
                    - Last published: ${build.date}
                  </j:if>
                </td>
                <j:if test="${context.findVariable('maven.xdoc.date') == 'bottom-right'}">
                  <td align="right">Last published: ${build.date}</td>
                </j:if>
              </tr>
            </table>
          </div>
        </body>
      </html>
    </jsl:template>
  
    <!-- process the properties of the doc -->
    <jsl:template match="properties" trim="false">
      <!-- stick head block here later -->
    </jsl:template>
  
    <!-- Process a menu for the navigation bar -->
    <jsl:template match="menu" trim="false">
      <div>
        <strong><x:expr select="@name"/></strong>
        <jsl:applyTemplates select="item"/>
      </div>
    </jsl:template>
  
    <jsl:template match="item" trim="false">
      <div>
        <j:set var="_name"><x:expr select="@name"/></j:set>
        <j:set var="_link"><x:expr select="@href"/></j:set>
        <small><doc:itemLink name="${_name}" link="${_link}"/></small>
        <jsl:applyTemplates select="item"/>
      </div>
    </jsl:template>
  
    <!-- Process the breadcrumb navbar -->
    <jsl:template match="links" trim="false">
      <j:set var="linkCount" value="1"/>
      <x:forEach var="link" select="item">
        <j:if test="${linkCount != 1}">|</j:if>
        <j:set var="_name">
          <x:expr select="@name"/>
        </j:set>
        <j:set var="_link">
          <x:expr select="@href"/>
        </j:set>
        <doc:itemLink name="${_name}" link="${_link}"/>
        <j:set var="linkCount" value="${1+linkCount}"/>
      </x:forEach>
    </jsl:template>
  
    <!-- process a documentation section -->
    <jsl:template match="section" trim="false">
      <div class="h3">
        <j:set var="_sectionName"><x:expr select="@name"/></j:set>
        <j:if test="${!empty(_sectionName)}">
          <h3>
            <a name="${_sectionName}">${_sectionName}</a>
          </h3>
        </j:if>
        <jsl:applyTemplates select="*"/>
      </div>
    </jsl:template>
  
    <jsl:template match="subsection" trim="false">
      <div class="h4">
        <j:set var="_sectionName"><x:expr select="@name"/></j:set>
        <j:if test="${!empty(_sectionName)}">
          <h4>
            <a name="${_sectionName}">${_sectionName}</a>
          </h4>
        </j:if>
        <jsl:applyTemplates select="*"/>
      </div>
    </jsl:template>
  
    <jsl:template match="source" trim="false">
      <div id="source">
        <pre><x:expr select="."/></pre>
      </div>
    </jsl:template>
  
    <jsl:template match="table" trim="false">
      <j:set var="rowcount" value="0"/>
      <table cellpadding="3" cellspacing="2" border="1" width="100%">
        <jsl:applyTemplates select="*"/>
      </table>
    </jsl:template>
  
    <jsl:template match="tr" trim="false">
      <j:choose>
        <j:when test="${rowMode == 'a'}">
          <j:set var="rowMode" value="b"/>
        </j:when>
        <j:otherwise>
          <j:set var="rowMode" value="a"/>
        </j:otherwise>
      </j:choose>
  
      <!-- copy attributes FIXME: Shouldn't this only be colspan|rowspan? -->
      <x:element name="tr"><j:whitespace trim="true">
        <x:attribute name="class">${rowMode}</x:attribute>
        <x:forEach var="attr" select="@*">
          <x:attribute name="${attr.name}">${attr.value}</x:attribute>
        </x:forEach>
        <jsl:applyTemplates select="*"/>
  </j:whitespace></x:element>
    </jsl:template>
  
    <!--************************-->
    <!-- glossary documentation -->
    <!--************************-->
    <jsl:template match="glossary" trim="false">
      <jsl:applyTemplates select="glossary-entries/glossary-entry" />
    </jsl:template>
        
    <jsl:template match="glossary-entry" trim="false">
      <strong><x:expr select="name" /></strong>
      <br/>
      <x:expr select="definition" />
      <p/>
    </jsl:template>
  
        <!--************************-->
        <!-- goals documentation    -->
        <!--************************-->
        <jsl:template match="goals" trim="false">
          <!-- reset row alternation -->
          <j:set var="rowMode" value="" />
          <div class="h3">
            <h3><a name="Goals">Goals</a></h3>
            <table>
              <tr width='100%'><th>Goal</th><th>Description</th></tr>
              <jsl:applyTemplates select="goal"/>
            </table>
          </div>
        </jsl:template>
        
        <!-- a goal -->
          <!-- FIXME: this is copied from tr - there must be a way of
               calling templates in jsl? -->
        <jsl:template match="goal" trim="false">
          <j:choose>
            <j:when test="${rowMode == 'a'}">
              <j:set var="rowMode" value="b"/>
            </j:when>
            <j:otherwise>
              <j:set var="rowMode" value="a"/>
            </j:otherwise>
          </j:choose>
          
          <x:element name="tr"><j:whitespace trim="true">
            <x:attribute name="class">${rowMode}</x:attribute>
            <j:set var="_goalName"><x:expr select="./name" /></j:set>
            <td width='200'><a name="${_goalName}">${_goalName}</a></td>
            <td><jsl:applyTemplates select="description" /></td>
  </j:whitespace></x:element>
        </jsl:template>   
        
        <jsl:template match="description">
          <x:expr select="."/>
        </jsl:template>
  
        <!--************************-->
        <!-- changelog documentation-->
        <!--************************-->
        <jsl:template match="changelog" trim="false">
          <j:set var="rowMode" value="" />
          <table width="100%">
            <tr>
              <th>Date</th><th>Author</th><th>Files/Message</th>
            </tr>
            <jsl:applyTemplates select="changelog-entry" />
          </table>
        </jsl:template>
  
        <!-- transform a changelog entry -->
        <!-- FIXME: tr code copied from above -->
        <jsl:template match="changelog-entry" trim="false">
          <j:choose>
            <j:when test="${rowMode == 'a'}">
              <j:set var="rowMode" value="b"/>
            </j:when>
            <j:otherwise>
              <j:set var="rowMode" value="a"/>
            </j:otherwise>
          </j:choose>
          
          <x:element name="tr"><j:whitespace trim="true">
            <x:attribute name="class">${rowMode}</x:attribute>
            
            <td><x:expr select="date" /> <x:expr select="time" /></td>
            <td><x:expr select="author"/></td>
            <td><jsl:applyTemplates select="*" />
              <pre><x:expr select="msg"/></pre>
            </td>
  </j:whitespace></x:element>
        </jsl:template>
  
        <jsl:template match="file">
          <j:set var="url">${pom.repository.url}<x:expr select="name"/></j:set>
          <j:set var="revUrl">${url}?<x:expr select="revision"/>&amp;content-type=text/vnd.viewcvs-markup</j:set>
          <a href="${url}"><x:expr select="name"/></a> - 
          <a href="${revUrl}">v<x:expr select="revision"/></a>
          <br/>
        </jsl:template>
  
  
    <!-- copy any other elements through -->
    <jsl:template match="*" trim="false">
      <jsl:copy trim="false">
        <jsl:applyTemplates trim="false"/>
      </jsl:copy>
     </jsl:template>
  
     <!-- element values don't pass through as text -->
     <jsl:template match="@*"/>
  
  </jsl:stylesheet>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/site/etc/stylesheet.css
  
  Index: stylesheet.css
  ===================================================================
  /* Javadoc style sheet */
  
  /* Define colors, fonts and other style attributes here to override the defaults */
  
  /* Page background color */
  body { background-color: #FFFFFF }
  
  /* Table colors */
  .TableHeadingColor     { background: #CCCCFF } /* Dark mauve */
  .TableSubHeadingColor  { background: #EEEEFF } /* Light mauve */
  .TableRowColor         { background: #FFFFFF } /* White */
  
  /* Font used in left-hand frame lists */
  .FrameTitleFont   { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
  .FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
  .FrameItemFont    { font-size: 10pts; font-family: Helvetica, Arial, san-serif }
  
  /* Example of smaller, sans-serif font in frames */
  /* .FrameItemFont  { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */
  
  /* Navigation bar fonts and colors */
  .NavBarCell1    { background-color:#EEEEFF;}/* Light mauve */
  .NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */
  .NavBarFont1    { font-family: Arial, Helvetica, sans-serif; color:#000000;}
  .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
  
  .NavBarCell2    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
  .NavBarCell3    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
  
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/site/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <document>
  
      <properties>
          <author email="leosutic@apache.org">Leo Sutic</author>
          <title>Jakarta Commons Attributes</title>
      </properties>
  
      <body>
  
          <section name="Overview">
              <p>
                  Commons Attributes enables Java programmers to use C#/.Net-style
                  attributes in their code.
              </p>
              
              <p>
                  Please see the Javadoc overview for more information. (I figure
                  it makes more sense to have it there.)
              </p>
          </section>
          
          
      </body>
  
  </document>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/site/xdocs/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <project>
  
   <title>Jakarta Commons Attributes</title>
  
   <body>
  
      <links>
        <item name="Home" href="http://jakarta.apache.org/"/>
        <item name="Jakarta Commons" href="http://jakarta.apache.org/commons/"/>
      </links>
  
      <menu name="About Commons Attributes">
        <item name="Overview" href="/index.html"/>
        <item name="API" href="/api/index.html"/>
      </menu>
  
   </body>
  
  </project>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="do-install" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
      
      <property file="${basedir}/../build.properties"/>
      <property file="${basedir}/../project.properties"/>
      <property file="project.properties"/>
      <property name="maven.jar.manifest.extensions.add" value="true"/>
      <property name="maven.checkstyle.format" value="avalon"/>
      <property name="pom.organization.identifier" value="ASF"/>
      <property name="pom.specificationVersion" value="1.0"/>
      
      <goal name="wrapper">
          <echo message="${maven.build.dest}"/>
          <taskdef name="attributes"
              classname="org.apache.commons.attributes.compiler.AttributeCompiler">
              <classpath>
                  <path refid="maven.dependency.classpath"/>
              </classpath>
          </taskdef>
          
          <!-- Set up the classloader tests -->
          <attributes destDir="target/cl1/">
              <fileset dir="src/cl1/" includes="**/*.java"/>
          </attributes>
          <attributes destDir="target/cl2/">
              <fileset dir="src/cl2/" includes="**/*.java"/>
          </attributes>
          <javac destdir="target/cl1/"
              debug="true"
              deprecation="true">
              <src> 
                  <pathelement path="target/cl1/"/>
                  <pathelement path="src/cl1/"/>
                  <pathelement path="src/java/"/>
              </src>
              <classpath>
                  <path refid="maven.dependency.classpath"/>
                  <pathelement path="target/cl1/"/>
              </classpath>
          </javac>
          <javac destdir="target/cl2/"
              classpath="target/cl2/"
              debug="true"
              deprecation="true">
              <src> 
                  <pathelement path="target/cl2/"/>
                  <pathelement path="src/cl2/"/>
                  <pathelement path="src/java/"/>
              </src>
              <classpath>
                  <path refid="maven.dependency.classpath"/>
                  <pathelement path="target/cl1/"/>
              </classpath>
          </javac>
          
          <taskdef name="attributes-index"
              classname="org.apache.commons.attributes.compiler.AttributeIndexer">
              <classpath>
                  <path refid="maven.dependency.classpath"/>
              </classpath>
          </taskdef>
          
          <jar jarfile="target/cl2/cl2.jar">
              <fileset dir="target/cl2/" includes="**/*.class"/>
              <fileset dir="target/cl2/" includes="META-INF/**/*"/>
          </jar>        
          
          <attributes-index jarFile="target/cl2/cl2.jar">
              <classpath>
                  <path refid="maven.dependency.classpath"/>
              </classpath>
          </attributes-index>
          
          <!-- Create the Attribute Repository Classes. -->
          <attributes destDir="target/temp/">
              <fileset dir="src/test/" includes="**/*.java"/>
          </attributes>
          <copy todir="target/temp/">
              <fileset dir="src/test/" includes="**/*.java"/>
          </copy>
          
          <attainGoal name="jar:install-snapshot"/>
      </goal>
  </project>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <project>
      <extend>${basedir}/../project.xml</extend>
      <id>jakarta-commons-attributes-unittest</id>
      <name>Jakarta Commons Attribute Compiler Unit Tests</name>
      <package>org.apache.commons.attributes</package>
      
      <currentVersion>0.1</currentVersion>
      <inceptionYear>2003</inceptionYear>
      <shortDescription>Compiler for Jakarta Commons Attributes in Java.</shortDescription>
      
      <description>
          A precompiler for java that enables the use of attributes as seen in C#.
      </description>
      
      <build>
          <unitTestSourceDirectory>${basedir}/target/temp</unitTestSourceDirectory>
      </build>
      
      <dependencies>
          <dependency>
              <groupId>ant</groupId>
              <artifactId>ant</artifactId>
              <version>1.5</version>
          </dependency>
          
          <dependency>
              <id>xdoclet+xjavadoc</id>
              <version>1.0</version>
          </dependency>
          
          <dependency>
              <id>commons-collections</id>
              <version>2.1</version>
          </dependency>
         
          
          <dependency>
              <groupId>jakarta-commons-attributes</groupId>
              <artifactId>jakarta-commons-attributes-compiler</artifactId>
              <version>SNAPSHOT</version>
          </dependency>
          
          <dependency>
              <groupId>jakarta-commons-attributes</groupId>
              <artifactId>jakarta-commons-attributes-api</artifactId>
              <version>SNAPSHOT</version>
          </dependency>
      </dependencies>
      
      <packageGroups>
          <packageGroup>
              <title>Application Program Interface (API)</title>
              <packages>org.apache.commons.attributes</packages>
          </packageGroup>
      </packageGroups>
      
  </project>
  
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/cl1/TestAttribute.java
  
  Index: TestAttribute.java
  ===================================================================
  public class TestAttribute {
      
      private final String key;
      
      public TestAttribute (String key) {
          this.key = key;
      }
      
      public String getKey () {
          return key;
      }
      
      public String toString () {
          return "[TestAttribute " + key + "]";
      }
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/cl1/TestClass.java
  
  Index: TestClass.java
  ===================================================================
  
  /**
   * @TestAttribute ("1")
   */
  public class TestClass {
      
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/cl2/TestAttribute.java
  
  Index: TestAttribute.java
  ===================================================================
  
  /**
   * @org.apache.commons.attributes.Indexed
   */
  public class TestAttribute {
      
      private final String key;
      
      public TestAttribute (String key) {
          this.key = key;
      }
      
      public String getKey () {
          return key;
      }
      
      public String toString () {
          return "[TestAttribute " + key + "]";
      }
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/cl2/TestClass.java
  
  Index: TestClass.java
  ===================================================================
  
  /**
   * @TestAttribute ("2")
   */
  public class TestClass {
      
      /**
       * @TestAttribute ("2inner")
       */
      public static class Inner {}
      
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/Dependency.java
  
  Index: Dependency.java
  ===================================================================
  package org.apache.commons.attributes.test;
  
  /**
   * Declares a dependency.
   * 
   * @org.apache.commons.attributes.Inheritable
   */
  public class Dependency {
      
      private final Class clazz;
      private final String name;
      
      public Dependency (Class clazz, String name) {
          this.clazz = clazz;
          this.name = name;
      }
      
      public Class getDependencyClass () {
          return clazz;
      }
      
      public String getDependencyName () {
          return name;
      }
      
      public boolean equals (Object o) {
          return o instanceof Dependency &&
              ((Dependency) o).clazz == clazz &&
              ((Dependency) o).name.equals (name);
      }
      
      public int hashCode () {
          return clazz.hashCode () ^ name.hashCode ();
      }
      
      public String toString () {
          return "[Dependency on " + clazz.getName () + " via name \"" + name + "\"]";
      }
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/Sample.java
  
  Index: Sample.java
  ===================================================================
  package org.apache.commons.attributes.test;
  
  /**
   * @ThreadSafe ()
   * @Dependency ( SampleService.class, "sample" )
   */
  public class Sample extends SuperSample implements SampleIFJoin {
      
      /**
       * @ThreadSafe ()
       */
      public Object field;
      
      public Object noAttributesInSubClass;
      
      /**
       * @Dependency ( SampleService.class, "sample-some-method1" )
       */
      public void someMethod () {
          
      }
      
      /**
       * @@Dependency ( SampleService.class, "sample-some-method2" )
       */
      public void someMethod (int parameter) {
          
      }
      
      public void methodWithNoAttributes () {
      }
      
      /**
       * @@Dependency ( SampleService.class, "inner-sample" )
       */
      public static class InnerSample {
      }
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/Sample2.java
  
  Index: Sample2.java
  ===================================================================
  package org.apache.commons.attributes.test;
  
  public class Sample2 {
      
  
      public Object aaaa;
   
      
  
      public Sample2 () {
          
      }
  
      public Sample2 (String input) {
          
      }
      
  
      public void someMethod () {
          
      }
  
      public void someMethod (int parameter) {
          
      }
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/SampleIF1.java
  
  Index: SampleIF1.java
  ===================================================================
  package org.apache.commons.attributes.test;
  
  /**
   * @Dependency ( SampleService.class, "sample-if-1-c" )
   */
  public interface SampleIF1 {
      
      /**
       * @Dependency ( SampleService.class, "sample-if-1" )
       * @ThreadSafe ()
       */
      public void someMethod (int parameter);
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/SampleIF2.java
  
  Index: SampleIF2.java
  ===================================================================
  package org.apache.commons.attributes.test;
  
  /**
   * @Dependency ( SampleService.class, "sample-if-2-c" )
   */
  public interface SampleIF2 {
      
      /**
       * @Dependency ( SampleService.class, "sample-if-2" )
       * @ThreadSafe ()
       */
      public void someMethod (int parameter);
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/SampleIFJoin.java
  
  Index: SampleIFJoin.java
  ===================================================================
  package org.apache.commons.attributes.test;
  
  public interface SampleIFJoin extends SampleIF1, SampleIF2 {
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/SampleService.java
  
  Index: SampleService.java
  ===================================================================
  package org.apache.commons.attributes.test;
  
  public interface SampleService {}
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/SuperSample.java
  
  Index: SuperSample.java
  ===================================================================
  package org.apache.commons.attributes.test;
  
  /**
   * @Dependency ( SampleService.class, "super-sample" )
   */
  public class SuperSample {
      
      /**
       * @ThreadSafe ()
       * @Dependency ( SampleService.class, "super-field" )
       */
      public Object field;
      
      /**
       * @Dependency ( SampleService.class, "super-noattrs" )
       */
      public Object noAttributesInSubClass;
      
      /**
       * @Dependency ( SampleService.class, "sample-ctor1" )
       */
      public SuperSample () {
          
      }
      
      /**
       * @Dependency ( SampleService.class, "sample-ctor2" )
       */
      public SuperSample (String input, String[][] array) {
          
      }
      
      /**
       * @Dependency ( SampleService.class, "super-some-method-sample" )
       * @ThreadSafe ()
       */
      public void someMethod (int parameter) {
          
      }
      
  }
  
  
  1.1                  jakarta-commons-sandbox/attributes/unittest/src/test/org/apache/commons/attributes/test/ThreadSafe.java
  
  Index: ThreadSafe.java
  ===================================================================
  package org.apache.commons.attributes.test;
  
  public class ThreadSafe {
      
      public ThreadSafe () {
      }
      
      public boolean equals (Object o) {
          return o instanceof ThreadSafe;
      }
      
      public int hashCode () {
          return 0;
      }
      
      public String toString () {
          return "[ThreadSafe]";
      }
  }
  
  

Mime
View raw message