001///////////////////////////////////////////////////////////////////////////////////////////////
002// checkstyle: Checks Java source code and other text files for adherence to a set of rules.
003// Copyright (C) 2001-2025 the original author or authors.
004//
005// This library is free software; you can redistribute it and/or
006// modify it under the terms of the GNU Lesser General Public
007// License as published by the Free Software Foundation; either
008// version 2.1 of the License, or (at your option) any later version.
009//
010// This library is distributed in the hope that it will be useful,
011// but WITHOUT ANY WARRANTY; without even the implied warranty of
012// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013// Lesser General Public License for more details.
014//
015// You should have received a copy of the GNU Lesser General Public
016// License along with this library; if not, write to the Free Software
017// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
018///////////////////////////////////////////////////////////////////////////////////////////////
019
020package com.puppycrawl.tools.checkstyle.meta;
021
022/** Simple POJO class module's property details. */
023public final class ModulePropertyDetails {
024
025    /** Name of property. */
026    private String name;
027
028    /** Type of property. */
029    private String type;
030
031    /** Default value of property. */
032    private String defaultValue;
033
034    /**
035     * This property is java type that plugins can use to validate user input, it is used when
036     * 'type' field is "String". It is used for special cases such as regexp and tokenSet.
037     */
038    private String validationType;
039
040    /** Description of property. */
041    private String description;
042
043    /** No-argument constructor. */
044    public ModulePropertyDetails() {
045        // empty constructor
046    }
047
048    /**
049     * All-argument constructor.
050     *
051     * @param name name.
052     * @param type type.
053     * @param defaultValue default value.
054     * @param validationType validation type.
055     * @param description description.
056     */
057    public ModulePropertyDetails(String name, String type, String defaultValue,
058            String validationType, String description) {
059        this.name = name;
060        this.type = type;
061        this.defaultValue = defaultValue;
062        this.validationType = validationType;
063        this.description = description;
064    }
065
066    /**
067     * Get name of property.
068     *
069     * @return name of property
070     */
071    public String getName() {
072        return name;
073    }
074
075    /**
076     * Set name of property.
077     *
078     * @param name name of property
079     */
080    public void setName(String name) {
081        this.name = name;
082    }
083
084    /**
085     * Get type of property.
086     *
087     * @return property type
088     */
089    public String getType() {
090        return type;
091    }
092
093    /**
094     * Set property type.
095     *
096     * @param type property type
097     */
098    public void setType(String type) {
099        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}