ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/types PatternSet.java
Date Tue, 24 Feb 2004 13:22:47 GMT
peterreilly    2004/02/24 05:22:47

  Modified:    src/main/org/apache/tools/ant/types PatternSet.java
  Log:
  style check on PatternSet
  
  Revision  Changes    Path
  1.37      +62 -0     ant/src/main/org/apache/tools/ant/types/PatternSet.java
  
  Index: PatternSet.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/PatternSet.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- PatternSet.java	9 Feb 2004 21:05:36 -0000	1.36
  +++ PatternSet.java	24 Feb 2004 13:22:47 -0000	1.37
  @@ -56,22 +56,55 @@
           private String ifCond;
           private String unlessCond;
   
  +        /**
  +         * Sets the name pattern.
  +         *
  +         * @param name The pattern string.
  +         */
           public void setName(String name) {
               this.name = name;
           }
   
  +        /**
  +         * Sets the if attribute. This attribute and the "unless"
  +         * attribute are used to validate the name, based in the
  +         * existence of the property.
  +         *
  +         * @param cond A property name. If this property is not
  +         *             present, the name is invalid.
  +         */
           public void setIf(String cond) {
               ifCond = cond;
           }
   
  +        /**
  +         * Sets the unless attribute. This attribute and the "if"
  +         * attribute are used to validate the name, based in the
  +         * existence of the property.
  +         *
  +         * @param cond A property name. If this property is
  +         *             present, the name is invalid.
  +         */
           public void setUnless(String cond) {
               unlessCond = cond;
           }
   
  +        /**
  +         * @return the name attribute.
  +         */
           public String getName() {
               return name;
           }
   
  +        /**
  +         * This validates the name - checks the if and unless
  +         * properties.
  +         *
  +         * @param p the current project, used to check the presence or
  +         *          absence of a property.
  +         * @return  the name attribute or null if the "if" or "unless"
  +         *          properties are not/are set.
  +         */
           public String evalName(Project p) {
               return valid(p) ? name : null;
           }
  @@ -85,6 +118,9 @@
               return true;
           }
   
  +        /**
  +         * @return a printable form of this object.
  +         */
           public String toString() {
               StringBuffer buf = new StringBuffer(name != null ? name : "");
               if ((ifCond != null) || (unlessCond != null)) {
  @@ -107,6 +143,9 @@
           }
       }
   
  +    /**
  +     * Creates a new <code>PatternSet</code> instance.
  +     */
       public PatternSet() {
           super();
       }
  @@ -117,6 +156,8 @@
        *
        * <p>You must not set another attribute or nest elements inside
        * this element if you make it a reference.</p>
  +     * @param r the reference to another patternset.
  +     * @throws BuildException on error.
        */
       public void setRefid(Reference r) throws BuildException {
           if (!includeList.isEmpty() || !excludeList.isEmpty()) {
  @@ -125,6 +166,11 @@
           super.setRefid(r);
       }
   
  +    /**
  +     * This is a patternset nested element.
  +     *
  +     * @param p a configured patternset nested element.
  +     */
       public void addConfiguredPatternset(PatternSet p) {
           if (isReference()) {
               throw noChildrenAllowed();
  @@ -148,6 +194,7 @@
   
       /**
        * add a name entry on the include list
  +     * @return a nested include element to be configured.
        */
       public NameEntry createInclude() {
           if (isReference()) {
  @@ -158,6 +205,7 @@
   
       /**
        * add a name entry on the include files list
  +     * @return a nested includesfile element to be configured.
        */
       public NameEntry createIncludesFile() {
           if (isReference()) {
  @@ -168,6 +216,7 @@
   
       /**
        * add a name entry on the exclude list
  +     * @return a nested exclude element to be configured.
        */
       public NameEntry createExclude() {
           if (isReference()) {
  @@ -178,6 +227,7 @@
   
       /**
        * add a name entry on the exclude files list
  +     * @return a nested excludesfile element to be configured.
        */
       public NameEntry createExcludesFile() {
           if (isReference()) {
  @@ -235,6 +285,7 @@
        * Sets the name of the file containing the includes patterns.
        *
        * @param includesFile The file to fetch the include patterns from.
  +     * @throws BuildException on error.
        */
        public void setIncludesfile(File includesFile) throws BuildException {
            if (isReference()) {
  @@ -247,6 +298,7 @@
        * Sets the name of the file containing the excludes patterns.
        *
        * @param excludesFile The file to fetch the exclude patterns from.
  +     * @throws BuildException on error.
        */
        public void setExcludesfile(File excludesFile) throws BuildException {
            if (isReference()) {
  @@ -295,6 +347,8 @@
   
       /**
        * Adds the patterns of the other instance to this set.
  +     * @param other the other PatternSet instance.
  +     * @param p the current project.
        */
       public void append(PatternSet other, Project p) {
           if (isReference()) {
  @@ -318,6 +372,8 @@
   
       /**
        * Returns the filtered include patterns.
  +     * @param p the current project.
  +     * @return the filtered included patterns.
        */
       public String[] getIncludePatterns(Project p) {
           if (isReference()) {
  @@ -330,6 +386,8 @@
   
       /**
        * Returns the filtered include patterns.
  +     * @param p the current project.
  +     * @return the filtered excluded patterns.
        */
       public String[] getExcludePatterns(Project p) {
           if (isReference()) {
  @@ -435,6 +493,9 @@
           }
       }
   
  +    /**
  +     * @return a printable form of this object.
  +     */
       public String toString() {
           return "patternSet{ includes: " + includeList
                   + " excludes: " + excludeList + " }";
  @@ -442,6 +503,7 @@
   
       /**
        * @since Ant 1.6
  +     * @return a clone of this patternset.
        */
       public Object clone() {
           if (isReference()) {
  
  
  

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


Mime
View raw message