Class StringLiteral

All Implemented Interfaces:
Serializable, SourceLocator, LocationProvider, SaxonLocator, EvaluableItem, SequenceIterable, InstructionInfo, Locator

public class StringLiteral extends Literal
Subclass of Literal used specifically for string literals, as this is a common case
See Also:
  • Constructor Details

    • StringLiteral

      public StringLiteral(StringValue value)
      Create a StringLiteral that wraps a StringValue
      Parameters:
      value - the StringValue
    • StringLiteral

      public StringLiteral(CharSequence value)
      Create a StringLiteral that wraps any CharSequence (including, of course, a String)
      Parameters:
      value - the CharSequence to be wrapped
  • Method Details

    • getStringValue

      public String getStringValue()
      Get the string represented by this StringLiteral
      Returns:
      the underlying string
    • copy

      public Expression copy()
      Description copied from class: Literal
      Copy an expression. This makes a deep copy.
      Overrides:
      copy in class Literal
      Returns:
      the copy of the original expression