Enum Class PropertySource

java.lang.Object
java.lang.Enum<PropertySource>
io.github.timoIpeters.custompropertyanalyzer.PropertySource
All Implemented Interfaces:
Serializable, Comparable<PropertySource>, Constable

public enum PropertySource extends Enum<PropertySource>
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.

  • Enum Constant Details

    • VALUE_ANNOTATION

      public static final PropertySource VALUE_ANNOTATION
      The property was discovered via a @Value("${my.property}") annotation on a field or constructor parameter.
    • CONFIGURATION_PROPERTIES

      public static final PropertySource CONFIGURATION_PROPERTIES
      The property was discovered by expanding the fields of a class annotated with @ConfigurationProperties.
  • Method Details

    • values

      public static PropertySource[] 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

      public static PropertySource valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getDisplayName

      public String 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")