Record Class TemplateDescriptor

java.lang.Object
java.lang.Record
com.azure.runtime.host.utils.templates.TemplateDescriptor
Record Components:
inputFilename - The path to the input template file, relative to the project's resources directory.
outputFilename - The name of the output file to be generated by the template engine, potentially including dynamic parts based on template processing.

public record TemplateDescriptor(String inputFilename, String outputFilename) extends Record
Represents a descriptor for template files within the Java Runtime for Azure framework. This record encapsulates the necessary information to identify and process template files, including their input and output filenames. Template descriptors are used by the TemplateEngine to generate resources based on predefined templates, facilitating the dynamic creation of application components and configurations.

The inputFilename specifies the location of the template file within the project's resources, while the outputFilename determines the name of the file generated by the template engine. This approach allows for flexible and maintainable template management, supporting a wide range of application scaffolding and configuration tasks.

  • Constructor Details

    • TemplateDescriptor

      public TemplateDescriptor(String inputFilename, String outputFilename)
      Creates an instance of a TemplateDescriptor record class.
      Parameters:
      inputFilename - the value for the inputFilename record component
      outputFilename - the value for the outputFilename 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. 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.
    • inputFilename

      public String inputFilename()
      Returns the value of the inputFilename record component.
      Returns:
      the value of the inputFilename record component
    • outputFilename

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