Leaf

class Leaf[T](val tagName: String, tag: String, r: To[T]) extends TaggedTo[T]
trait TaggedTo[T]
trait Tagged
trait SimpleTo[T]
trait SimpleVisitor[Any, T]
trait To[T]
trait Visitor[Any, T]
trait AutoCloseable
class Object
trait Matchable
class Any

Value members

Concrete methods

def findTo(s: String): To[T]
override
def map[Z](f: T => Z): TaggedTo[Z]
Definition Classes
override
def mapNulls[Z](f: T => Z): TaggedTo[Z]
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
override
def expectedMsg: String
Definition Classes
Inherited from
TaggedTo
def narrow[K <: T]: To[K]
Inherited from
To
override
def visitArray(length: Int): ArrVisitor[Any, T]
Definition Classes
Inherited from
TaggedTo
def visitBinary(bytes: Array[Byte], offset: Int, len: Int): T
Inherited from
SimpleVisitor
def visitChar(c: Char): T
Inherited from
SimpleVisitor
def visitExt(tag: Byte, bytes: Array[Byte], offset: Int, len: Int): T
Inherited from
SimpleVisitor
def visitFalse(): T
Inherited from
SimpleVisitor
def visitFloat32(d: Float): T
Inherited from
SimpleVisitor
def visitFloat64(d: Double): T
Inherited from
SimpleVisitor
def visitFloat64String(s: String): T
Inherited from
SimpleVisitor
def visitFloat64StringParts(cs: CharSequence, decIndex: Int, expIndex: Int): T
Inherited from
SimpleVisitor
def visitInt32(i: Int): T
Inherited from
SimpleVisitor
def visitInt64(l: Long): T
Inherited from
SimpleVisitor
def visitNull(): T
Inherited from
SimpleVisitor
override
def visitObject(length: Int): ObjVisitor[Any, T]
Definition Classes
Inherited from
TaggedTo
def visitString(cs: CharSequence): T
Inherited from
SimpleVisitor
def visitTimestamp(instant: Instant): T
Inherited from
SimpleVisitor
def visitTrue(): T
Inherited from
SimpleVisitor
def visitUInt64(ul: Long): T
Inherited from
SimpleVisitor

Concrete fields

override
val tagName: String