object Source
Note: this companion object provides a few very basic Source-constructor helpers,
but the real useful functionality is provided by the "parser backend" modules like
xml-spac-javax
and json-spac-jackson
, via JavaxSource
and JacksonSource
.
- Source
- Source.scala
- Alphabetic
- By Inheritance
- Source
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def defer[A](getUnderlying: => Source[A]): Source[A]
Creates a reusable source which will construct a new underlying source, by calling
getUnderlying
, each time itsopen
is called.Creates a reusable source which will construct a new underlying source, by calling
getUnderlying
, each time itsopen
is called.- getUnderlying
A call-by-name expression that constructs the underlying source. The expression is expected to be reusable, i.e. it might construct a new InputStream internally, and should not "close over" an existing stream that cannot be reused
- def deferOnce[A](getUnderlying: => Source[A]): Source[A]
Creates a new Source which delegates to an underlying Source constructed from a call-by-name parameter, and ensures the new Source can only be opened once.
Creates a new Source which delegates to an underlying Source constructed from a call-by-name parameter, and ensures the new Source can only be opened once.
- A
The source item type
- getUnderlying
A call-by-name expression that constructs the underlying source that should be used at most once
- returns
A new Source
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def fromChain[A](chain: Chain[A]): Source[A]
Wraps a
Chain
as aSource
.Wraps a
Chain
as aSource
.- A
The Chain item type
- chain
The wrapped Chain
- returns
A new Source which delegates to the Chain
- def fromIterable[A](collection: Iterable[A], shouldCloseIterators: Boolean = true): Source[A]
Converts an iterable collection to a Source.
Converts an iterable collection to a Source.
- A
The Source item type
- collection
The collection
- shouldCloseIterators
If
true
, any AutoCloseable iterators returned by this source'sopen
will be closed during the correspondingclose
operation.- returns
A view of the given
collection
as aSource
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def singleUse[A](itr: Iterator[A]): Source[A]
Wraps an existing iterator as a
Source
which may only be used once.Wraps an existing iterator as a
Source
which may only be used once.- A
The iterator's item type
- itr
The wrapped iterator
- returns
A new
Source
that will return the given iterator when opened, and has a no-op close operation.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()