public static class Path.HintedTypeProvider extends Path.StructuredDataHintingTypeProvider
Path.TypeProvider) implementation that tries
to deduce the types on the path based on the current position and the intended type of the final segment of
the path.| Constructor and Description |
|---|
HintedTypeProvider(SegmentType intendedFinalType,
Path.Extender extender)
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Path.Segment |
deduceSegment(String type,
String id,
boolean isLast)
This is called during parsing of a single segment when the built-in defaults cannot determine the type and
id to use for segment.
|
void |
finished()
Called when the parsing of the path finishes (either successfully or unsuccessfully).
|
void |
segmentParsed(Path.Segment segment)
This method gets called during the parsing process after a segment is successfully parsed.
|
public HintedTypeProvider(SegmentType intendedFinalType, Path.Extender extender)
intendedFinalType - the anticipated type of the final segmentextender - an initial pathpublic void segmentParsed(Path.Segment segment)
Path.TypeProvidersegmentParsed in interface Path.TypeProvidersegmentParsed in class Path.StructuredDataHintingTypeProvidersegment - the segment parsedpublic Path.Segment deduceSegment(String type, String id, boolean isLast)
Path.TypeProviderIf this method returns null, the parsing of the path will fail with an IllegalArgumentException.
deduceSegment in interface Path.TypeProviderdeduceSegment in class Path.StructuredDataHintingTypeProvidertype - the parsed type nameid - the parsed idisLast - true if the parsed segment is the last in the pathpublic void finished()
Path.TypeProviderfinished in interface Path.TypeProviderfinished in class Path.StructuredDataHintingTypeProviderCopyright © 2014–2016 Red Hat, Inc.. All rights reserved.