leosutic    2003/08/15 14:45:49

  Modified:    attributes/api/src/java/org/apache/avalon/attributes
                        AttributeIndex.java
  Log:
  Added some Javadoc.
  
  Revision  Changes    Path
  1.2       +16 -0     
avalon-sandbox/attributes/api/src/java/org/apache/avalon/attributes/AttributeIndex.java
  
  Index: AttributeIndex.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/attributes/api/src/java/org/apache/avalon/attributes/AttributeIndex.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AttributeIndex.java       14 Aug 2003 22:11:51 -0000      1.1
  +++ AttributeIndex.java       15 Aug 2003 21:45:49 -0000      1.2
  @@ -12,6 +12,12 @@
   import java.util.HashSet;
   import java.util.StringTokenizer;
   
  +/**
  + * An index providing a list of classes with given attributes. This
  + * requires that the attribute is <code>Indexed</code> and that the
  + * attribute indexer tool has been run on the jar file containing the
  + * classes.
  + */
   public class AttributeIndex {
       
       private final HashMap index = new HashMap ();
  @@ -24,6 +30,9 @@
           }
       }
       
  +    /**
  +     * Add a class to the index.
  +     */
       private void addClass (String attributeClass, String clazz) {
           Collection coll = (Collection) index.get (attributeClass);
           if (coll == null) {
  @@ -33,6 +42,9 @@
           coll.add (clazz);
       }
       
  +    /**
  +     * Load the attrs.index from a given URL.
  +     */
       private void loadFromURL (URL url) throws Exception {
           URLConnection connection = url.openConnection ();
               BufferedReader br = new BufferedReader (new InputStreamReader 
(connection.getInputStream ()));
  @@ -64,6 +76,10 @@
           }
       }
       
  +    /**
  +     * Gets a Collection of the classes that have an attribute of the specified 
class.
  +     * The Collection contains the class names (String).
  +     */
       public Collection getClassesWithAttribute (Class attributeClass) {
           return getClassesWithAttribute (attributeClass.getName ());
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to