Record Class GenericXmlLocator.Located

java.lang.Object
java.lang.Record
io.jenkins.plugins.configsplice.engine.xml.GenericXmlLocator.Located
Enclosing class:
GenericXmlLocator

public static record GenericXmlLocator.Located(SourceRange range, GenericXmlLocator.Located.Kind kind, char quote, String rawValue) extends Record
A located target: an attribute value, or an element's text.

rawValue is the value currently in the file, which in a configuration file may itself be a secret. The generated record toString() would print it, so it is overridden to mask.

  • Constructor Details

    • Located

      public Located(SourceRange range, GenericXmlLocator.Located.Kind kind, char quote, String rawValue)
      Creates an instance of a Located record class.
      Parameters:
      range - the value for the range record component
      kind - the value for the kind record component
      quote - the value for the quote record component
      rawValue - the value for the rawValue record component
  • Method Details

    • decodedValue

      public String decodedValue()
      The current value with entities resolved, for idempotency comparisons.
    • toString

      public 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.
    • range

      public SourceRange range()
      Returns the value of the range record component.
      Returns:
      the value of the range record component
    • kind

      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • quote

      public char quote()
      Returns the value of the quote record component.
      Returns:
      the value of the quote record component
    • rawValue

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