ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/types PropertySet.java
Date Thu, 05 Aug 2004 17:14:31 GMT
stevel      2004/08/05 10:14:31

  Modified:    src/main/org/apache/tools/ant/types PropertySet.java
  Log:
  javadocs
  
  Revision  Changes    Path
  1.15      +22 -1     ant/src/main/org/apache/tools/ant/types/PropertySet.java
  
  Index: PropertySet.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/PropertySet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- PropertySet.java	11 Mar 2004 23:40:59 -0000	1.14
  +++ PropertySet.java	5 Aug 2004 17:14:31 -0000	1.15
  @@ -47,6 +47,10 @@
       private Vector setRefs = new Vector();
       private Mapper _mapper;
   
  +    /**
  +     * this is a nested class containing a reference to some properties
  +     * and optionally a source of properties.
  +     */
       public static class PropertyRef {
   
           private int count;
  @@ -92,7 +96,7 @@
                   + ", builtin=" + builtin;
           }
   
  -    }
  +    } //end nested class
   
       public void appendName(String name) {
           PropertyRef ref = new PropertyRef();
  @@ -118,6 +122,12 @@
           addPropertyref(ref);
       }
   
  +    /**
  +     * set a mapper to change property names
  +     * @param type mapper type
  +     * @param from source pattern
  +     * @param to output pattern
  +     */
       public void setMapper(String type, String from, String to) {
           Mapper mapper = createMapper();
           Mapper.MapperType mapperType = new Mapper.MapperType();
  @@ -163,6 +173,10 @@
           return isReference() ? getRef()._mapper : _mapper;
       }
   
  +    /**
  +     * this is the operation to get the existing or recalculated properties.
  +     * @return
  +     */
       public Properties getProperties() {
           Set names = null;
           Project prj = getProject();
  @@ -200,10 +214,12 @@
               mapper = myMapper.getImplementation();
           }
           Properties properties = new Properties();
  +        //iterate through the names, get the matching values
           for (Iterator iter = names.iterator(); iter.hasNext();) {
               String name = (String) iter.next();
               String value = (String) props.get(name);
               if (mapper != null) {
  +                //map the names
                   String[] newname = mapper.mapFileName(name);
                   if (newname != null) {
                       name = newname[0];
  @@ -317,6 +333,11 @@
           }
           noAttributeSet = false;
       }
  +
  +    /**
  +     * flag which tracks whether any attribute has been set; used by
  +     * {@link #assertNotReference()} and {@link #setRefid(Reference)}
  +     */
       private boolean noAttributeSet = true;
   
       /**
  
  
  

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


Mime
View raw message