Record Class UnknownKeyOptions
java.lang.Object
java.lang.Record
com.patbaumgartner.spring.migrator.core.UnknownKeyOptions
- Record Components:
policy- whether to look for unrecognised keys, and whether they fail the buildincludes- namespaces to inspect instead of the built-in defaults, which is how a project opts a namespace of its own into the checkexcludes- exact keys or prefixes to never report, which is the escape hatch for keys read directly by application code or by a library that publishes no metadata
public record UnknownKeyOptions(UnknownKeyPolicy policy, List<String> includes, List<String> excludes)
extends Record
How a run should treat configuration keys that no metadata describes.
-
Constructor Summary
ConstructorsConstructorDescriptionUnknownKeyOptions(UnknownKeyPolicy policy, List<String> includes, List<String> excludes) Defensively copies the lists and acceptsnullfor either, so that a build tool that leaves an unset list parameter alone behaves like one that sets it empty. -
Method Summary
Modifier and TypeMethodDescriptionstatic UnknownKeyOptionsdisabled()Returns options that switch the check off, which is the default.final booleanIndicates whether some other object is "equal to" this one.excludes()Returns the value of theexcludesrecord component.final inthashCode()Returns a hash code value for this object.includes()Returns the value of theincludesrecord component.policy()Returns the value of thepolicyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UnknownKeyOptions
Defensively copies the lists and acceptsnullfor either, so that a build tool that leaves an unset list parameter alone behaves like one that sets it empty.- Parameters:
policy- whether to look for unrecognised keysincludes- namespaces to inspect instead of the built-in defaultsexcludes- exact keys or prefixes to never report
-
-
Method Details
-
disabled
Returns options that switch the check off, which is the default.- Returns:
- disabled options
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
policy
Returns the value of thepolicyrecord component.- Returns:
- the value of the
policyrecord component
-
includes
Returns the value of theincludesrecord component.- Returns:
- the value of the
includesrecord component
-
excludes
Returns the value of theexcludesrecord component.- Returns:
- the value of the
excludesrecord component
-