Class SMTExpr.StringLiteral

All Implemented Interfaces:
IAttributeValue, IExpr, IExpr.ILiteral, IExpr.IStringLiteral, INode, IPos.IPosable, IResponse
Enclosing class:
SMTExpr

public static class SMTExpr.StringLiteral extends SMTExpr.Literal<String> implements IExpr.IStringLiteral
This class represents an SMT String literal expression or syntax token
  • Constructor Details

    • StringLiteral

      public StringLiteral(SMT.Configuration smtConfig, String value, boolean quoted)
      Creates a string literal. If quoted is true the argument is the raw SMT-LIB text (with enclosing quotes and escape sequences), unescaped per the given Configuration's rules (escaping is version-dependent -- see Utils.unescape); if false it is already the unescaped Java string and smtConfig is unused. Issue #22: this used to read a single static SMTExpr.smtConfig field shared process-wide, so which Configuration's rules applied depended on whichever Configuration was most recently constructed anywhere in the process, not the one actually driving this literal's construction.
  • Method Details

    • equals

      public boolean equals(Object o)
      Equal to any IStringLiteral with the same string value
      Overrides:
      equals in class Pos.Posable
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Pos.Posable
    • accept

      public <T> T accept(IVisitor<T> v) throws IVisitor.VisitorException
      Description copied from interface: INode
      The accept method corresponding to IVisitor, to be implemented in each subclass as { return v.visit(this); }
      Specified by:
      accept in interface INode
      Type Parameters:
      T - the return type desired from the visit methods
      Parameters:
      v - the visitor class
      Returns:
      the value returned by the visit method
      Throws:
      IVisitor.VisitorException