Enum Class PropertySource
- All Implemented Interfaces:
Serializable,Comparable<PropertySource>,Constable
Describes how a custom property was discovered during source analysis.
This value is included in the JSON report under the "source" field for each
property entry, allowing consumers of the report to distinguish between the two
Spring mechanisms for externalizing configuration.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe property was discovered by expanding the fields of a class annotated with@ConfigurationProperties.The property was discovered via a@Value("${my.property}")annotation on a field or constructor parameter. -
Method Summary
Modifier and TypeMethodDescriptionReturns a human-readable label for this source, used in console output when running the analysis task with--verbose.static PropertySourceReturns the enum constant of this class with the specified name.static PropertySource[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VALUE_ANNOTATION
The property was discovered via a@Value("${my.property}")annotation on a field or constructor parameter. -
CONFIGURATION_PROPERTIES
The property was discovered by expanding the fields of a class annotated with@ConfigurationProperties.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getDisplayName
Returns a human-readable label for this source, used in console output when running the analysis task with--verbose.- Returns:
- the display name (e.g.
"@Value Annotations")
-