Record Class ConfigurationValidationBlock

java.lang.Object
java.lang.Record
io.micronaut.starter.feature.validation.ConfigurationValidationBlock
Record Components:
enabled - Whether configuration validation is enabled
suppressions - Regex patterns for property keys to suppress in validation reports
suppressInjectErrors - Patterns for dependency injection errors to suppress
failOnNotPresent - Whether generation fails when expected configuration is not present
deduceEnvironments - Whether environments should be deduced automatically
validateDependencyInjection - Whether dependency injection wiring should be validated
format - Output format, for example json, html, or both
outputDirectory - Output directory where validation reports are written
devEnvironments - Additional environments for the dev block
packageValidationEnvironments - Additional environments for the packageValidation block
cacheEnabled - Whether validation cache is enabled
testEnvironments - Additional environments for the test block

@NullMarked @Introspected public record ConfigurationValidationBlock(@Nullable Boolean enabled, @Nullable List<String> suppressions, @Nullable List<String> suppressInjectErrors, @Nullable Boolean failOnNotPresent, @Nullable Boolean deduceEnvironments, @Nullable Boolean validateDependencyInjection, @Nullable String format, @Nullable String outputDirectory, @Nullable List<String> devEnvironments, @Nullable List<String> packageValidationEnvironments, @Nullable Boolean cacheEnabled, @Nullable List<String> testEnvironments) extends Record
Represents the <configurationValidation> block used by the Micronaut Maven plugin.
See Also:
  • Constructor Details

    • ConfigurationValidationBlock

      public ConfigurationValidationBlock(@Nullable Boolean enabled, @Nullable List<String> suppressions, @Nullable List<String> suppressInjectErrors, @Nullable Boolean failOnNotPresent, @Nullable Boolean deduceEnvironments, @Nullable Boolean validateDependencyInjection, @Nullable String format, @Nullable String outputDirectory, @Nullable List<String> devEnvironments, @Nullable List<String> packageValidationEnvironments, @Nullable Boolean cacheEnabled, @Nullable List<String> testEnvironments)
      Creates an instance of a ConfigurationValidationBlock record class.
      Parameters:
      enabled - the value for the enabled record component
      suppressions - the value for the suppressions record component
      suppressInjectErrors - the value for the suppressInjectErrors record component
      failOnNotPresent - the value for the failOnNotPresent record component
      deduceEnvironments - the value for the deduceEnvironments record component
      validateDependencyInjection - the value for the validateDependencyInjection record component
      format - the value for the format record component
      outputDirectory - the value for the outputDirectory record component
      devEnvironments - the value for the devEnvironments record component
      packageValidationEnvironments - the value for the packageValidationEnvironments record component
      cacheEnabled - the value for the cacheEnabled record component
      testEnvironments - the value for the testEnvironments record component
  • Method Details

    • toXml

      public @NonNull String toXml()
      Serializes this configuration into the XML fragment expected by the plugin.
      Returns:
      XML for a <configurationValidation> element
    • builder

      public static @NonNull ConfigurationValidationBlock.Builder builder()
      Returns:
      A builder for ConfigurationValidationBlock
    • 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
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final 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.
    • enabled

      public @Nullable Boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • suppressions

      public @Nullable List<String> suppressions()
      Returns the value of the suppressions record component.
      Returns:
      the value of the suppressions record component
    • suppressInjectErrors

      public @Nullable List<String> suppressInjectErrors()
      Returns the value of the suppressInjectErrors record component.
      Returns:
      the value of the suppressInjectErrors record component
    • failOnNotPresent

      public @Nullable Boolean failOnNotPresent()
      Returns the value of the failOnNotPresent record component.
      Returns:
      the value of the failOnNotPresent record component
    • deduceEnvironments

      public @Nullable Boolean deduceEnvironments()
      Returns the value of the deduceEnvironments record component.
      Returns:
      the value of the deduceEnvironments record component
    • validateDependencyInjection

      public @Nullable Boolean validateDependencyInjection()
      Returns the value of the validateDependencyInjection record component.
      Returns:
      the value of the validateDependencyInjection record component
    • format

      public @Nullable String format()
      Returns the value of the format record component.
      Returns:
      the value of the format record component
    • outputDirectory

      public @Nullable String outputDirectory()
      Returns the value of the outputDirectory record component.
      Returns:
      the value of the outputDirectory record component
    • devEnvironments

      public @Nullable List<String> devEnvironments()
      Returns the value of the devEnvironments record component.
      Returns:
      the value of the devEnvironments record component
    • packageValidationEnvironments

      public @Nullable List<String> packageValidationEnvironments()
      Returns the value of the packageValidationEnvironments record component.
      Returns:
      the value of the packageValidationEnvironments record component
    • cacheEnabled

      public @Nullable Boolean cacheEnabled()
      Returns the value of the cacheEnabled record component.
      Returns:
      the value of the cacheEnabled record component
    • testEnvironments

      public @Nullable List<String> testEnvironments()
      Returns the value of the testEnvironments record component.
      Returns:
      the value of the testEnvironments record component