View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.rule.properties;
5   
6   /**
7    * 
8    * @author Brian Remedios
9    * @param <T>
10   */
11  public abstract class AbstractMultiPackagedProperty<T> extends AbstractPackagedProperty<T> {
12  
13      protected static final char DELIMITER = '|';
14      
15      /**
16       * Constructor for AbstractMultiPackagedProperty.
17       * @param theName String
18       * @param theDescription String
19       * @param theDefault T
20       * @param theLegalPackageNames String[]
21       * @param theUIOrder float
22       */
23      protected AbstractMultiPackagedProperty(String theName,  String theDescription, T theDefault, String[] theLegalPackageNames, float theUIOrder) {
24          super(theName, theDescription, theDefault, theLegalPackageNames, theUIOrder);
25      }
26  
27      /**
28       * @return boolean
29       * @see net.sourceforge.pmd.PropertyDescriptor#isMultiValue()
30       */
31      @Override
32      public boolean isMultiValue() {
33          return true;
34      }
35      
36      /**
37       * @return String
38       */
39      protected String defaultAsString() {
40          return asDelimitedString(defaultValue());
41      }
42  }