Record Class Settings

java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.apionly.transcriberj.spi.Settings
Record Components:
contract - the name of the contract, as the project subscribes to it
basePackage - the package the core classes go in
generateDocs - whether descriptions come from the contract; when false, every description is descriptionPlaceholder
descriptionPlaceholder - the description used when generateDocs is false
recursionDepth - how many times a recursive reference is followed before the rest is documented as a subsection
descriptionBundle - the base name of a ResourceBundle the generated classes resolve their descriptions through, or null when the project supplies none; what generation produced is the fallback

public record Settings(String contract, String basePackage, boolean generateDocs, String descriptionPlaceholder, int recursionDepth, String descriptionBundle) extends Record
How a project has asked for one contract's classes to be generated.
  • Constructor Details

    • Settings

      public Settings(String contract, String basePackage, boolean generateDocs, String descriptionPlaceholder, int recursionDepth)
      Settings without a description bundle, as every contract was generated before projects could supply one.
      Parameters:
      contract - the name of the contract
      basePackage - the package the core classes go in
      generateDocs - whether descriptions come from the contract
      descriptionPlaceholder - the description used when generateDocs is false
      recursionDepth - how many times a recursive reference is followed
    • Settings

      public Settings(String contract, String basePackage, boolean generateDocs, String descriptionPlaceholder, int recursionDepth, String descriptionBundle)
      Creates an instance of a Settings record class.
      Parameters:
      contract - the value for the contract record component
      basePackage - the value for the basePackage record component
      generateDocs - the value for the generateDocs record component
      descriptionPlaceholder - the value for the descriptionPlaceholder record component
      recursionDepth - the value for the recursionDepth record component
      descriptionBundle - the value for the descriptionBundle record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • contract

      public String contract()
      Returns the value of the contract record component.
      Returns:
      the value of the contract record component
    • basePackage

      public String basePackage()
      Returns the value of the basePackage record component.
      Returns:
      the value of the basePackage record component
    • generateDocs

      public boolean generateDocs()
      Returns the value of the generateDocs record component.
      Returns:
      the value of the generateDocs record component
    • descriptionPlaceholder

      public String descriptionPlaceholder()
      Returns the value of the descriptionPlaceholder record component.
      Returns:
      the value of the descriptionPlaceholder record component
    • recursionDepth

      public int recursionDepth()
      Returns the value of the recursionDepth record component.
      Returns:
      the value of the recursionDepth record component
    • descriptionBundle

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