View Javadoc
1   ///////////////////////////////////////////////////////////////////////////////////////////////
2   // checkstyle: Checks Java source code and other text files for adherence to a set of rules.
3   // Copyright (C) 2001-2025 the original author or authors.
4   //
5   // This library is free software; you can redistribute it and/or
6   // modify it under the terms of the GNU Lesser General Public
7   // License as published by the Free Software Foundation; either
8   // version 2.1 of the License, or (at your option) any later version.
9   //
10  // This library is distributed in the hope that it will be useful,
11  // but WITHOUT ANY WARRANTY; without even the implied warranty of
12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  // Lesser General Public License for more details.
14  //
15  // You should have received a copy of the GNU Lesser General Public
16  // License along with this library; if not, write to the Free Software
17  // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  ///////////////////////////////////////////////////////////////////////////////////////////////
19  
20  package com.puppycrawl.tools.checkstyle.meta;
21  
22  /** Simple POJO class module's property details. */
23  public final class ModulePropertyDetails {
24  
25      /** Name of property. */
26      private String name;
27  
28      /** Type of property. */
29      private String type;
30  
31      /** Default value of property. */
32      private String defaultValue;
33  
34      /**
35       * This property is java type that plugins can use to validate user input, it is used when
36       * 'type' field is "String". It is used for special cases such as regexp and tokenSet.
37       */
38      private String validationType;
39  
40      /** Description of property. */
41      private String description;
42  
43      /** No-argument constructor. */
44      public ModulePropertyDetails() {
45          // empty constructor
46      }
47  
48      /**
49       * All-argument constructor.
50       *
51       * @param name name.
52       * @param type type.
53       * @param defaultValue default value.
54       * @param validationType validation type.
55       * @param description description.
56       */
57      public ModulePropertyDetails(String name, String type, String defaultValue,
58              String validationType, String description) {
59          this.name = name;
60          this.type = type;
61          this.defaultValue = defaultValue;
62          this.validationType = validationType;
63          this.description = description;
64      }
65  
66      /**
67       * Get name of property.
68       *
69       * @return name of property
70       */
71      public String getName() {
72          return name;
73      }
74  
75      /**
76       * Set name of property.
77       *
78       * @param name name of property
79       */
80      public void setName(String name) {
81          this.name = name;
82      }
83  
84      /**
85       * Get type of property.
86       *
87       * @return property type
88       */
89      public String getType() {
90          return type;
91      }
92  
93      /**
94       * Set property type.
95       *
96       * @param type property type
97       */
98      public void setType(String type) {
99          this.type = type;
100     }
101 
102     /**
103      * Get default value of property.
104      *
105      * @return default value of property
106      */
107     public String getDefaultValue() {
108         return defaultValue;
109     }
110 
111     /**
112      * Set default value of property.
113      *
114      * @param defaultValue default value of property
115      */
116     public void setDefaultValue(String defaultValue) {
117         this.defaultValue = defaultValue;
118     }
119 
120     /**
121      * Get validation type of property.
122      *
123      * @return validation type of property
124      */
125     public String getValidationType() {
126         return validationType;
127     }
128 
129     /**
130      * Set validation type of property.
131      *
132      * @param validationType validation type of property
133      */
134     public void setValidationType(String validationType) {
135         this.validationType = validationType;
136     }
137 
138     /**
139      * Get description of property.
140      *
141      * @return property description
142      */
143     public String getDescription() {
144         return description;
145     }
146 
147     /**
148      * Set description of property.
149      *
150      * @param description property description
151      */
152     public void setDescription(String description) {
153         this.description = description;
154     }
155 }