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       * 
18       * @param theName String
19       * @param theDescription String
20       * @param theDefault T
21       * @param theLegalPackageNames String[]
22       * @param theUIOrder float
23       */
24      protected AbstractMultiPackagedProperty(String theName, String theDescription, T theDefault,
25              String[] theLegalPackageNames, float theUIOrder) {
26          super(theName, theDescription, theDefault, theLegalPackageNames, theUIOrder);
27      }
28  
29      /**
30       * @return boolean
31       * @see net.sourceforge.pmd.PropertyDescriptor#isMultiValue()
32       */
33      @Override
34      public boolean isMultiValue() {
35          return true;
36      }
37  
38      /**
39       * @return String
40       */
41      protected String defaultAsString() {
42          return asDelimitedString(defaultValue());
43      }
44  }