Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.dataformat.javaprop.util

public abstract Class JPropPathSplitter

extends Object
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.NonSplitting, com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.CharPathOnlySplitter, com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.StringPathOnlySplitter, com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.IndexOnlySplitter, com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.FullSplitter
Imports
java.util.regex.Matcher, .Pattern, com.fasterxml.jackson.dataformat.javaprop.JavaPropsSchema

Helper class used for splitting a flattened property key into nested/structured path that can be used to traverse and/or define hierarchic structure.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
JPropPathSplitter.CharPathOnlySplitter

Simple variant where we only have path separator, and optional "segment is index iff value is integer number"

public static class
JPropPathSplitter.FullSplitter

Instance that supports both path separator and index markers (and possibly also "simple" indexes)

public static class
JPropPathSplitter.IndexOnlySplitter

Special variant that does not use path separator, but does allow index indicator, at the end of path.

public static class
JPropPathSplitter.NonSplitting

"No-op" implementation that does no splitting and simply adds entries as is.

public static class
JPropPathSplitter.StringPathOnlySplitter

Simple variant where we only have path separator, and optional "segment is index iff value is integer number"

Field Summary

Modifier and TypeField and Description
protected final boolean

Constructor Summary

AccessConstructor and Description
protected
JPropPathSplitter(boolean useSimpleIndex)

Method Summary

Modifier and TypeMethod and Description
protected JPropNode
_addSegment(JPropNode parent, String segment)

protected int
_asInt(String segment)

protected JPropNode
_lastSegment(JPropNode parent, String path, int start, int end)

public static JPropPathSplitter
private static JPropPathSplitter
public abstract JPropNode

Returns:

Newly added node
splitAndAdd
(JPropNode parent, String key, String value)

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_useSimpleIndexback to summary
protected final boolean _useSimpleIndex

Constructor Detail

JPropPathSplitterback to summary
protected JPropPathSplitter(boolean useSimpleIndex)

Method Detail

_addSegmentback to summary
protected JPropNode _addSegment(JPropNode parent, String segment)
_asIntback to summary
protected int _asInt(String segment)
_lastSegmentback to summary
protected JPropNode _lastSegment(JPropNode parent, String path, int start, int end)
createback to summary
public static JPropPathSplitter create(JavaPropsSchema schema)
pathOnlySplitterback to summary
private static JPropPathSplitter pathOnlySplitter(JavaPropsSchema schema)
splitAndAddback to summary
public abstract JPropNode splitAndAdd(JPropNode parent, String key, String value)

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Returns:JPropNode

Newly added node

com.fasterxml.jackson.dataformat.javaprop.util back to summary

public Class JPropPathSplitter.CharPathOnlySplitter

extends JPropPathSplitter
Class Inheritance

Simple variant where we only have path separator, and optional "segment is index iff value is integer number"

Field Summary

Modifier and TypeField and Description
protected final char
protected final char
Inherited from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter:
_useSimpleIndex

Constructor Summary

AccessConstructor and Description
public
CharPathOnlySplitter(char sepChar, char pathSeparatorEscapeChar, boolean useIndex)

Method Summary

Modifier and TypeMethod and Description
private JPropNode
_continueWithEscapes(JPropNode parent, String key, int start, String value)

public JPropNode
splitAndAdd(JPropNode parent, String key, String value)

Implements abstract com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Inherited from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter:
_addSegment_asInt_lastSegmentcreate

Field Detail

_pathSeparatorCharback to summary
protected final char _pathSeparatorChar
_pathSeparatorEscapeCharback to summary
protected final char _pathSeparatorEscapeChar

Constructor Detail

CharPathOnlySplitterback to summary
public CharPathOnlySplitter(char sepChar, char pathSeparatorEscapeChar, boolean useIndex)

Method Detail

_continueWithEscapesback to summary
private JPropNode _continueWithEscapes(JPropNode parent, String key, int start, String value)
splitAndAddback to summary
public JPropNode splitAndAdd(JPropNode parent, String key, String value)

Implements abstract com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Doc from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Returns:JPropNode

Newly added node

Annotations
@Override
com.fasterxml.jackson.dataformat.javaprop.util back to summary

public Class JPropPathSplitter.FullSplitter

extends JPropPathSplitter
Class Inheritance

Instance that supports both path separator and index markers (and possibly also "simple" indexes)

Field Summary

Modifier and TypeField and Description
protected final int
protected final Pattern
protected final String
protected final JPropPathSplitter
Inherited from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter:
_useSimpleIndex

Constructor Summary

AccessConstructor and Description
public
FullSplitter(String pathSeparator, boolean useSimpleIndex, Markers indexMarker, JPropPathSplitter fallbackSplitter, String prefix)

Method Summary

Modifier and TypeMethod and Description
public JPropNode
splitAndAdd(JPropNode parent, String key, String value)

Implements abstract com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Inherited from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter:
_addSegment_asInt_lastSegmentcreate

Field Detail

_indexFirstCharback to summary
protected final int _indexFirstChar
_indexMatchback to summary
protected final Pattern _indexMatch
_prefixback to summary
protected final String _prefix
Since
2.10
_simpleSplitterback to summary
protected final JPropPathSplitter _simpleSplitter

Constructor Detail

FullSplitterback to summary
public FullSplitter(String pathSeparator, boolean useSimpleIndex, Markers indexMarker, JPropPathSplitter fallbackSplitter, String prefix)

Method Detail

splitAndAddback to summary
public JPropNode splitAndAdd(JPropNode parent, String key, String value)

Implements abstract com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Doc from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Returns:JPropNode

Newly added node

Annotations
@Override
com.fasterxml.jackson.dataformat.javaprop.util back to summary

public Class JPropPathSplitter.IndexOnlySplitter

extends JPropPathSplitter
Class Inheritance

Special variant that does not use path separator, but does allow index indicator, at the end of path.

Field Summary

Modifier and TypeField and Description
protected final Pattern
Inherited from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter:
_useSimpleIndex

Constructor Summary

AccessConstructor and Description
public
IndexOnlySplitter(boolean useSimpleIndex, Markers indexMarker)

Method Summary

Modifier and TypeMethod and Description
protected JPropNode
_splitMore(JPropNode parent, String prefix, String indexStr)

public JPropNode
splitAndAdd(JPropNode parent, String key, String value)

Implements abstract com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Inherited from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter:
_addSegment_asInt_lastSegmentcreate

Field Detail

_indexMatchback to summary
protected final Pattern _indexMatch

Constructor Detail

IndexOnlySplitterback to summary
public IndexOnlySplitter(boolean useSimpleIndex, Markers indexMarker)

Method Detail

_splitMoreback to summary
protected JPropNode _splitMore(JPropNode parent, String prefix, String indexStr)
splitAndAddback to summary
public JPropNode splitAndAdd(JPropNode parent, String key, String value)

Implements abstract com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Doc from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Returns:JPropNode

Newly added node

Annotations
@Override
com.fasterxml.jackson.dataformat.javaprop.util back to summary

public Class JPropPathSplitter.NonSplitting

extends JPropPathSplitter
Class Inheritance

"No-op" implementation that does no splitting and simply adds entries as is.

Field Summary

Modifier and TypeField and Description
public static final JPropPathSplitter.NonSplitting
Inherited from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter:
_useSimpleIndex

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public JPropNode
splitAndAdd(JPropNode parent, String key, String value)

Implements abstract com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Inherited from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter:
_addSegment_asInt_lastSegmentcreate

Field Detail

instanceback to summary
public static final JPropPathSplitter.NonSplitting instance

Constructor Detail

NonSplittingback to summary
private NonSplitting()

Method Detail

splitAndAddback to summary
public JPropNode splitAndAdd(JPropNode parent, String key, String value)

Implements abstract com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Doc from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Returns:JPropNode

Newly added node

Annotations
@Override
com.fasterxml.jackson.dataformat.javaprop.util back to summary

public Class JPropPathSplitter.StringPathOnlySplitter

extends JPropPathSplitter
Class Inheritance

Simple variant where we only have path separator, and optional "segment is index iff value is integer number"

Field Summary

Modifier and TypeField and Description
protected final String
protected final int
Inherited from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter:
_useSimpleIndex

Constructor Summary

AccessConstructor and Description
public
StringPathOnlySplitter(String pathSeparator, boolean useIndex)

Method Summary

Modifier and TypeMethod and Description
public JPropNode
splitAndAdd(JPropNode parent, String key, String value)

Implements abstract com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Inherited from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter:
_addSegment_asInt_lastSegmentcreate

Field Detail

_pathSeparatorback to summary
protected final String _pathSeparator
_pathSeparatorLengthback to summary
protected final int _pathSeparatorLength

Constructor Detail

StringPathOnlySplitterback to summary
public StringPathOnlySplitter(String pathSeparator, boolean useIndex)

Method Detail

splitAndAddback to summary
public JPropNode splitAndAdd(JPropNode parent, String key, String value)

Implements abstract com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Doc from com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter.splitAndAdd.

Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

Returns:JPropNode

Newly added node

Annotations
@Override