Class StringLiteral

    • Constructor Detail

      • StringLiteral

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

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

      • getValue

        public StringValue getValue()
        Get the value represented by this Literal
        Overrides:
        getValue in class Literal
        Returns:
        the constant value
      • getStringValue

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

        public Expression copy​(RebindingMap rebindings)
        Description copied from class: Literal
        Copy an expression. This makes a deep copy.
        Overrides:
        copy in class Literal
        Parameters:
        rebindings - variables that need to be re-bound
        Returns:
        a copy of the original literal. Note that the underlying value is not copied; the code relies on the caller treating the underlying value as immutable.