avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosu...@apache.org
Subject cvs commit: avalon-sandbox/attributes/compiler/src/java/org/apache/avalon/attributes/compiler package.html
Date Sun, 10 Aug 2003 22:25:03 GMT
leosutic    2003/08/10 15:25:03

  Added:       attributes/api/src/java/org/apache/avalon/attributes
                        CircularDependencyError.java package.html
                        RepositoryError.java
               attributes/api/src/java overview.html
               attributes/compiler/src/java/org/apache/avalon/attributes/compiler
                        package.html
  Log:
  1. Moved all build stuff into Maven.
  2. Wrote a proper test case.
  3. Included support for attributes attached to fields and constructors.
  4. Slight code cleanups.
  
  Revision  Changes    Path
  1.1                  avalon-sandbox/attributes/api/src/java/org/apache/avalon/attributes/CircularDependencyError.java
  
  Index: CircularDependencyError.java
  ===================================================================
  package org.apache.avalon.attributes;
  
  import java.util.Iterator;
  import java.util.List;
  
  /**
   * Thrown when an attribute repository class can't be
   * loaded because it resulted in a circular dependency.
   */
  public class CircularDependencyError extends RepositoryError {
     
      /**
       * Create a new CircularDependencyError.
       *
       * @param className the name of the class that started it all.
       * @param dependencyList a list of the classes that the original
       *                       class depended on, the classes they
       *                       depended on, and so on. The list should
       *                       show the chain of dependencies that resulted
       *                       in the exception being thrown.
       */
      public CircularDependencyError (String className, List dependencyList) {
          super (className + ":" + listDeps (dependencyList), null);
      }
      
      /**
       * Joins together the elements of a list with <code>-&gt;</code>
       * delimiters. Used to show the sequence that resulted in the circular
       * dependency.
       */
      private static String listDeps (List dependencyList) {
          StringBuffer sb = new StringBuffer ();
          Iterator iter = dependencyList.iterator ();
          while (iter.hasNext ()) {
              sb.append (iter.next ());
              if (iter.hasNext ()) {
                  sb.append (" -> ");
              }
          }
          
          return sb.toString ();
      }
  }
  
  
  1.1                  avalon-sandbox/attributes/api/src/java/org/apache/avalon/attributes/package.html
  
  Index: package.html
  ===================================================================
  <html>
      <body>
          <p>Provides an API for accessing attributes.
      </body>
  </html>
  
  
  
  1.1                  avalon-sandbox/attributes/api/src/java/org/apache/avalon/attributes/RepositoryError.java
  
  Index: RepositoryError.java
  ===================================================================
  package org.apache.avalon.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                  avalon-sandbox/attributes/api/src/java/overview.html
  
  Index: overview.html
  ===================================================================
  <html>
      <body>
          <p>The Avalon Attributes projects provides a Java preprocessor
          and an API that enables developers to use C#-like attributes in their programs.
      </body>
  </html>
  
  
  
  1.1                  avalon-sandbox/attributes/compiler/src/java/org/apache/avalon/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>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message