StringVisitor

object StringVisitor extends SimpleVisitor[Nothing, Any]
trait SimpleVisitor[Nothing, Any]
trait Visitor[Nothing, Any]
trait AutoCloseable
class Object
trait Matchable
class Any

Value members

Concrete methods

def expectedMsg: String
override
def visitString(cs: CharSequence): CharSequence
Definition Classes

Inherited methods

override
def close(): Unit

==Responsibility== Generally, whoever creates the visitor should be responsible for closing it, i.e. not intermediate transform(v: Visitor) methods themselves.

==Responsibility== Generally, whoever creates the visitor should be responsible for closing it, i.e. not intermediate transform(v: Visitor) methods themselves.

==Self Closing== Given that common usage is most often single-valued (e.g. "{}"), rather than multi-valued (e.g. "{} {} {}"), Visitors may self-close (e.g. visitor.map{v => Try(v.close); v)} after a single value to prevent resource leaks, but are encouraged to expose both forms (i.e. single/multiple), if supportable.

==Multiple close() calls/Idempotency== Visitors are encouraged to respond gracefully if close() is called multiple times. If an underlying resource would throw if already closed, this may mean adding a private var isClosed: Boolean field to prevent multiple calls.

Definition Classes
Visitor -> AutoCloseable
Inherited from
Visitor
def map[Z](f: Any => Z): Visitor[Nothing, Z]
Inherited from
Visitor
def mapNulls[Z](f: Any => Z): Visitor[Nothing, Z]
Inherited from
Visitor
def visitArray(length: Int): ArrVisitor[Nothing, Any]
Inherited from
SimpleVisitor
def visitBinary(bytes: Array[Byte], offset: Int, len: Int): Any
Inherited from
SimpleVisitor
def visitChar(c: Char): Any
Inherited from
SimpleVisitor
def visitExt(tag: Byte, bytes: Array[Byte], offset: Int, len: Int): Any
Inherited from
SimpleVisitor
def visitFalse(): Any
Inherited from
SimpleVisitor
def visitFloat32(d: Float): Any
Inherited from
SimpleVisitor
def visitFloat64(d: Double): Any
Inherited from
SimpleVisitor
def visitFloat64String(s: String): Any
Inherited from
SimpleVisitor
def visitFloat64StringParts(cs: CharSequence, decIndex: Int, expIndex: Int): Any
Inherited from
SimpleVisitor
def visitInt32(i: Int): Any
Inherited from
SimpleVisitor
def visitInt64(l: Long): Any
Inherited from
SimpleVisitor
def visitNull(): Any
Inherited from
SimpleVisitor
def visitObject(length: Int): ObjVisitor[Nothing, Any]
Inherited from
SimpleVisitor
def visitTimestamp(instant: Instant): Any
Inherited from
SimpleVisitor
def visitTrue(): Any
Inherited from
SimpleVisitor
def visitUInt64(ul: Long): Any
Inherited from
SimpleVisitor