Record Class PropertyInfo

java.lang.Object
java.lang.Record
io.github.timoIpeters.custompropertyanalyzer.PropertyInfo
Record Components:
fullPath - The fully qualified property key in canonical kebab-case (e.g. app.database.max-connections).
defaultValue - The resolved default value for this property, or null if none could be determined. Values from configuration files take precedence over defaults declared inline in @Value annotations.
source - How this property was discovered — see PropertySource.
location - The simple file name of the Java source file where this property was found (e.g. DatabaseProperties.java).

public record PropertyInfo(String fullPath, String defaultValue, PropertySource source, String location) extends Record
Represents a single custom property discovered during analysis of a Spring Boot project.

Each instance captures where the property was found, how it is sourced, and what default value it carries. Equality and hashing are based solely on fullPath, so that the same property key discovered in multiple passes is deduplicated in the result set.

  • Constructor Details

    • PropertyInfo

      public PropertyInfo(String fullPath, String defaultValue, PropertySource source, String location)
      Creates an instance of a PropertyInfo record class.
      Parameters:
      fullPath - the value for the fullPath record component
      defaultValue - the value for the defaultValue record component
      source - the value for the source record component
      location - the value for the location record component
  • Method Details

    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • fullPath

      public String fullPath()
      Returns the value of the fullPath record component.
      Returns:
      the value of the fullPath record component
    • defaultValue

      public String defaultValue()
      Returns the value of the defaultValue record component.
      Returns:
      the value of the defaultValue record component
    • source

      public PropertySource source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • location

      public String location()
      Returns the value of the location record component.
      Returns:
      the value of the location record component