public class Parsers extends Object
Parser.
Typical usage is as follows:
newParserConfigBuilder() for a new
Parser.Config.Builder.Parser.Config.Builder.putTagHandler(Tag, TagHandler)
to register TagHandlers for any custom
Tags used by your expected input documents.Parser.Config to
newParser(Parser.Config) to create a Parser.Parseables using
newParseable(CharSequence) or
newParseable(Readable).Parser.nextValue(Parseable) to get
the edn values contained in your Parseable| Modifier and Type | Method and Description |
|---|---|
static Parser.Config |
defaultConfiguration()
Return the default configuration.
|
static Parseable |
newParseable(CharSequence cs)
Create a new
Parseable wrapping the given CharSequence. |
static Parseable |
newParseable(Readable r)
|
static Parser |
newParser(Parser.Config cfg)
Return a Parser configured by the given
Parser.Config. |
static Parser.Config.Builder |
newParserConfigBuilder()
Return a new
Parser.Config.Builder. |
public static Parser newParser(Parser.Config cfg)
Parser.Config.cfg - The configuration of the Parser. Must not be null.public static Parseable newParseable(CharSequence cs)
Parseable wrapping the given CharSequence.
The Closeable.close() method of the resulting
Parseable is a no-op.
cs - must not be null.public static Parseable newParseable(Readable r)
Parseable wrapping the given Readable.
The Closeable.close() method of the
resulting Parseable closes the r if r is itself
Closable.
r - a Readable which must not be null.public static Parser.Config.Builder newParserConfigBuilder()
Parser.Config.Builder.Parser.Config.Builder, never null.public static Parser.Config defaultConfiguration()
newParserConfigBuilder().build().Parser.Config, never null.Copyright © 2019. All rights reserved.