Package org.snakeyaml.engine.v2.resolver
Class BaseScalarResolver
java.lang.Object
org.snakeyaml.engine.v2.resolver.BaseScalarResolver
- All Implemented Interfaces:
ScalarResolver
- Direct Known Subclasses:
CoreScalarResolver
,FailsafeScalarResolver
,JsonScalarResolver
Base resolver
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addImplicitResolver
(Tag tag, Pattern regexp, String first) Add a resolver to resolve a value that matches the provided regular expression to the provided tag(package private) abstract void
Register all the resolvers to be appliedResolve (detect) the tag of the scalar node of the given type.
-
Field Details
-
EMPTY
No value indication -
ENV_FORMAT
group 1: name, group 2: separator, group 3: value -
yamlImplicitResolvers
Map from the char to the resolver which may begin with this char
-
-
Constructor Details
-
BaseScalarResolver
public BaseScalarResolver()Create
-
-
Method Details
-
addImplicitResolver
Add a resolver to resolve a value that matches the provided regular expression to the provided tag- Parameters:
tag
- - the Tag to assign when the value matchesregexp
- - the RE which is applied for every valuefirst
- - the possible first characters (this is merely for performance improvement) to skip RE evaluation to gain time
-
addImplicitResolvers
abstract void addImplicitResolvers()Register all the resolvers to be applied -
resolve
Description copied from interface:ScalarResolver
Resolve (detect) the tag of the scalar node of the given type.- Specified by:
resolve
in interfaceScalarResolver
- Parameters:
value
- - the value of the scalar nodeimplicit
- - true if there was no tag specified (the tag will be resolved)- Returns:
- the Tag that matches the contents
-