Class PropertyDetails
java.lang.Object
com.puppycrawl.tools.checkstyle.site.PropertyDetails
Immutable data object holding all pre-computed details for a single module property.
Built by
SiteUtil.buildPropertyDetails(java.util.Set<java.lang.String>, java.lang.String, java.nio.file.Path, java.lang.Object); consumed by PropertiesMacro
purely for formatting. No internal Checkstyle AST or Javadoc tree types appear here.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder forPropertyDetails.static enumDescribes how the type cell and default-value cell should be rendered for token-related properties. -
Field Summary
FieldsModifier and TypeFieldDescriptionThe list of configurable token names used whentokenPropertyTypeisPropertyDetails.TokenPropertyType.TOKEN_SUBSETorPropertyDetails.TokenPropertyType.JAVADOC_TOKEN_SUBSET.private final StringThe pre-resolved default value string, e.g.Pre-resolved list of token names used when the default-value cell must render each token as an individual link.private final StringThe human-readable description, already rendered as xdoc-safe HTML.private final StringThe property name.private final StringThe "since" version string, e.g.private final PropertyDetails.TokenPropertyTypeDetermines how the type cell is rendered byPropertiesMacro.private final StringThe resolved type string, e.g. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePropertyDetails(PropertyDetails.Builder builder) Creates a newPropertyDetailsfrom the given builder. -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of configurable token names.Returns the pre-resolved default value string.Returns the list of token names to render as individual links in the default-value cell.Returns the xdoc-safe HTML description.getName()Returns the property name.Returns the "since" version string.Returns the rendering strategy for the type and default-value cells.getType()Returns the resolved type string.
-
Field Details
-
name
The property name. -
description
The human-readable description, already rendered as xdoc-safe HTML. Produced bySiteUtil.getPropertyDescriptionForXdoc. -
type
The resolved type string, e.g."boolean","int","subset of tokens TokenTypes". Meaningful only whentokenPropertyTypeisPropertyDetails.TokenPropertyType.STANDARD. -
tokenPropertyType
Determines how the type cell is rendered byPropertiesMacro. Defaults toPropertyDetails.TokenPropertyType.STANDARD. -
configurableTokens
The list of configurable token names used whentokenPropertyTypeisPropertyDetails.TokenPropertyType.TOKEN_SUBSETorPropertyDetails.TokenPropertyType.JAVADOC_TOKEN_SUBSET. Empty otherwise. -
defaultValue
The pre-resolved default value string, e.g."{}","true","all files","TokenTypes". When the default value cell must render individual token links,defaultValueTokensis used instead and this field is empty. -
defaultValueTokens
Pre-resolved list of token names used when the default-value cell must render each token as an individual link. Empty whendefaultValueshould be rendered verbatim. -
sinceVersion
The "since" version string, e.g."8.3".
-
-
Constructor Details
-
PropertyDetails
Creates a newPropertyDetailsfrom the given builder.- Parameters:
builder- the builder to copy field values from.
-
-
Method Details
-
getName
Returns the property name.- Returns:
- the property name.
-
getDescription
Returns the xdoc-safe HTML description.- Returns:
- the description.
-
getType
Returns the resolved type string. Meaningful only whengetTokenPropertyType()isPropertyDetails.TokenPropertyType.STANDARD.- Returns:
- the type string, or
nullfor token properties.
-
getTokenPropertyType
Returns the rendering strategy for the type and default-value cells.- Returns:
- the token property type.
-
getConfigurableTokens
Returns the list of configurable token names. Non-empty only whengetTokenPropertyType()isPropertyDetails.TokenPropertyType.TOKEN_SUBSETorPropertyDetails.TokenPropertyType.JAVADOC_TOKEN_SUBSET.- Returns:
- an unmodifiable list of token names.
-
getDefaultValue
Returns the pre-resolved default value string. Empty whengetDefaultValueTokens()should be used instead.- Returns:
- the default value string.
-
getDefaultValueTokens
Returns the list of token names to render as individual links in the default-value cell. Empty whengetDefaultValue()should be used instead.- Returns:
- an unmodifiable list of token names.
-
getSinceVersion
Returns the "since" version string.- Returns:
- the since version.
-