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, ornullif none could be determined. Values from configuration files take precedence over defaults declared inline in@Valueannotations.source- How this property was discovered — seePropertySource.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 Summary
ConstructorsConstructorDescriptionPropertyInfo(String fullPath, String defaultValue, PropertySource source, String location) Creates an instance of aPropertyInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefaultValuerecord component.booleanIndicates whether some other object is "equal to" this one.fullPath()Returns the value of thefullPathrecord component.inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PropertyInfo
Creates an instance of aPropertyInforecord class.- Parameters:
fullPath- the value for thefullPathrecord componentdefaultValue- the value for thedefaultValuerecord componentsource- the value for thesourcerecord componentlocation- the value for thelocationrecord component
-
-
Method Details
-
equals
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 withObjects::equals(Object,Object). -
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. -
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. -
fullPath
Returns the value of thefullPathrecord component.- Returns:
- the value of the
fullPathrecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-