001/////////////////////////////////////////////////////////////////////////////////////////////// 002// checkstyle: Checks Java source code and other text files for adherence to a set of rules. 003// Copyright (C) 2001-2024 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; 021 022/** 023 * Represents the custom property type used in documentation and configuration files. 024 */ 025public enum PropertyType { 026 027 /** This property is a file. */ 028 FILE("File"), 029 030 /** This property is a string represents an ISO 3166 2-letter code. */ 031 LOCALE_COUNTRY("String (either the empty string or an uppercase ISO 3166 2-letter code)"), 032 033 /** This property is a string represents an ISO 639 code. */ 034 LOCALE_LANGUAGE("String (either the empty string or a lowercase ISO 639 code)"), 035 036 /** This property is a regular expression pattern. */ 037 PATTERN("Pattern"), 038 039 /** This property is a string. */ 040 STRING("String"), 041 042 /** This property is a set of tokens. */ 043 TOKEN_ARRAY("subset of tokens TokenTypes"); 044 045 /** The human-readable property description. */ 046 private final String description; 047 048 /** 049 * Creates a new {@code PropertyType} instance. 050 * 051 * @param description the human-readable property description 052 */ 053 PropertyType(String description) { 054 this.description = description; 055 } 056 057 /** 058 * Returns the human-readable property description. 059 * 060 * @return human-readable property description 061 */ 062 public String getDescription() { 063 return description; 064 } 065 066}