public static interface Parser.Config
Parser.Config.Builder,
provided by Parsers.newParserConfigBuilder().
A Config provides two kinds of configuration:
CollectionBuilder.Factory for building each of:
lists, vectors, sets and maps.Tags to TagHandlers:
#uuid and #inst, which are
defined by edn, are provided with handlers by
default.BIG_DECIMAL_TAG,
DOUBLE_TAG, BIG_INTEGER_TAG and
LONG_TAG can be provided with TagHandlers to
influence how numeric literals are represented by
Parser.nextValue(Parseable).| Modifier and Type | Interface and Description |
|---|---|
static interface |
Parser.Config.Builder
This Builder is used to create a
Parser.Config. |
| Modifier and Type | Field and Description |
|---|---|
static Tag |
BIG_DECIMAL_TAG
Floating point literals which are marked by a trailing "M"
are initially parsed as
BigDecimal. |
static Tag |
BIG_INTEGER_TAG
Integer literals marked by a trailing "N", and those not so
marked which lie outside the range of a
Long are
initially parsed as BigInteger. |
static Tag |
DOUBLE_TAG
Floating point literals not marked by a trailing "M" are
initially parsed as
Double. |
static Tag |
EDN_INSTANT
This is the
#inst tag specified by edn. |
static Tag |
EDN_UUID
This is the
#uuid tag specified by edn. |
static Tag |
LONG_TAG
Integer literals which lie inside the range of a
Long and are not marked by a trailing "N" are initially
parsed as Long. |
| Modifier and Type | Method and Description |
|---|---|
CollectionBuilder.Factory |
getListFactory()
Provide a
CollectionBuilder.Factory to receive the
contents of a list literal. |
CollectionBuilder.Factory |
getMapFactory()
Provide a
CollectionBuilder.Factory to receive the
contents of a map literal. |
CollectionBuilder.Factory |
getSetFactory()
Provide a
CollectionBuilder.Factory to receive the
contents of a set literal. |
TagHandler |
getTagHandler(Tag tag)
Return the
TagHandler associated with the given
Tag, or null. |
CollectionBuilder.Factory |
getVectorFactory()
Provide a
CollectionBuilder.Factory to receive the
contents of a vector literal. |
static final Tag EDN_UUID
#uuid tag specified by edn.static final Tag EDN_INSTANT
#inst tag specified by edn.static final Tag BIG_DECIMAL_TAG
BigDecimal.
If you wish to customize the representation of decimal
floating point literals, install a TagHandler for this
Tag. The result of calling this handler with the parsed
BigDecimal will be used in the value
returned by the parser.
static final Tag DOUBLE_TAG
static final Tag BIG_INTEGER_TAG
Long are
initially parsed as BigInteger.
Install a TagHandler for this tag if you wish to
customize the representation of big integer literals. The
result of calling this handler with the parsed
BigInteger will be used in the value returned by
the parser.
static final Tag LONG_TAG
Long and are not marked by a trailing "N" are initially
parsed as Long.
Install a TagHandler for this tag if you wish to
customize the representation of long integer literals. The
result of calling this handler with the parsed Long will be used in the value returned by the
parser.
CollectionBuilder.Factory getListFactory()
CollectionBuilder.Factory to receive the
contents of a list literal.
The default implementation returns an unmodifiable view
of a List that does not implement RandomAccess.
CollectionBuilder.Factory getVectorFactory()
CollectionBuilder.Factory to receive the
contents of a vector literal.
The default implementation returns an unmodifiable view
of a List that implements RandomAccess.
CollectionBuilder.Factory getSetFactory()
CollectionBuilder.Factory to receive the
contents of a set literal.
The default implementation returns an unmodifiable view
of a Set (hashed, not sorted).
CollectionBuilder.Factory getMapFactory()
CollectionBuilder.Factory to receive the
contents of a map literal.
The default implementation returns an unmodifiable view
of a Map (hashed, not sorted).
TagHandler getTagHandler(Tag tag)
TagHandler associated with the given
Tag, or null.tag - must not be null.tag, or null.Copyright © 2019. All rights reserved.