Enum MdlContentSpecType
- java.lang.Object
-
- java.lang.Enum<MdlContentSpecType>
-
- com.thomasjensen.checkstyle.addons.checks.misc.MdlContentSpecType
-
- All Implemented Interfaces:
Serializable
,Comparable<MdlContentSpecType>
public enum MdlContentSpecType extends Enum<MdlContentSpecType>
Thetype
values which are possible in the allow and deny lists of the directories.json configuration file used by theModuleDirectoryLayoutCheck
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FileExtensions
A comma-separated list of file extensions, excluding leading dots.FromPath
one of the MDL paths listed in directories.json.SimpleFolder
the simple name of a folder which, if present anywhere on the specific path, constitutes a match.SimpleName
the simple name of a file, for examplefile.txt
SpecificPathRegex
a regular expression which is applied to the specific path.TopLevelFolder
the simple name of a folder which, if present at the top of the specific path, constitutes a match.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MdlContentSpecType
valueOf(String name)
Returns the enum constant of this type with the specified name.static MdlContentSpecType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FileExtensions
public static final MdlContentSpecType FileExtensions
A comma-separated list of file extensions, excluding leading dots.
-
FromPath
public static final MdlContentSpecType FromPath
one of the MDL paths listed in directories.json. Can only be used in deny lists. Denies everything that is contained in the allow list of the referenced MDL path.
-
SimpleName
public static final MdlContentSpecType SimpleName
the simple name of a file, for examplefile.txt
-
SpecificPathRegex
public static final MdlContentSpecType SpecificPathRegex
a regular expression which is applied to the specific path. Note that slashes or backslashes may be present in that path depending on the current platform.
-
TopLevelFolder
public static final MdlContentSpecType TopLevelFolder
the simple name of a folder which, if present at the top of the specific path, constitutes a match. Folders which are specified as top-level folders may not occur again further down on the path. For example, ifMETA-INF
was specified as top-level folder, a path likeMETA-INF/foo/META-INF/file.txt
would be illegal.
-
SimpleFolder
public static final MdlContentSpecType SimpleFolder
the simple name of a folder which, if present anywhere on the specific path, constitutes a match. For example,doc-files
would match all files contained somewhere in adoc-files
folder.
-
-
Method Detail
-
values
public static MdlContentSpecType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MdlContentSpecType c : MdlContentSpecType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MdlContentSpecType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-