public class Resolver extends Object
Modifier and Type | Field and Description |
---|---|
static Pattern |
BOOL |
static Pattern |
EMPTY |
static Pattern |
FLOAT
The regular expression is taken from the 1.2 specification but '_'s are added to keep backwards
compatibility
|
static Pattern |
INT |
static Pattern |
MERGE |
static Pattern |
NULL |
static Pattern |
TIMESTAMP |
static Pattern |
VALUE |
static Pattern |
YAML |
protected Map<Character,List<org.yaml.snakeyaml.resolver.ResolverTuple>> |
yamlImplicitResolvers |
Constructor and Description |
---|
Resolver() |
Modifier and Type | Method and Description |
---|---|
void |
addImplicitResolver(Tag tag,
Pattern regexp,
String first) |
void |
addImplicitResolver(Tag tag,
Pattern regexp,
String first,
int limit)
Add a resolver to resolve a value that matches the provided regular expression to the provided
tag
|
protected void |
addImplicitResolvers() |
Tag |
resolve(NodeId kind,
String value,
boolean implicit) |
public static final Pattern BOOL
public static final Pattern FLOAT
public static final Pattern INT
public static final Pattern MERGE
public static final Pattern NULL
public static final Pattern EMPTY
public static final Pattern TIMESTAMP
public static final Pattern VALUE
public static final Pattern YAML
protected void addImplicitResolvers()
public void addImplicitResolver(Tag tag, Pattern regexp, String first, int limit)
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 timelimit
- - the limit of the value to analyze. The limit is here only to fight the DoS
attack when huge values are provided, and it may lead to slow pattern evaluationCopyright © 2008–2022. All rights reserved.