key for the TransitionMetaData beforeState
key for the TransitionMetaData afterState
key for the TransitionMetaData isDestructive flag
separator between each key and value (defaults to "")
set to true if keys should be case-sensitive (defaults to false)
key for the TransitionMetaData afterState
key for the TransitionMetaData beforeState
set to true if keys should be case-sensitive (defaults to false)
key for the TransitionMetaData isDestructive flag
separator between each key and value (defaults to "")
Parse an optional TransitionMetaData instance from the given String.
Parse an optional TransitionMetaData instance from the given String.
A
TransitionMetadataParserfor text in which theTransitionMetadatafields are provided in a key/value format.The keys are beforeStateKey, afterStateKey, and isDestructiveKey, and they must appear in that order in the parsed text. By default, the keys are case-insensitive; this can be explicitly set using caseSensitiveKeys.
Each key and its value may be separated by an optional token (keyValueSeparator), which may itself be surrounded by zero or more whitespace characters (spaces, tabs, newlines, etc.). The keyValueSeparator defaults to "".
The value for the before state and the after state in the parsed text may contain any non-whitespace characters, and it must be separated from the subsequent text by at least one whitespace character (i.e., the value is "end-delimited" by whitespace). The value for the 'is destructive' flag must be either "true" or "false", and is case-insensitive.
For example: If instantiated with beforeStateKey = "transition-before", afterStateKey = "transition-after", isDestructiveKey = "transition-destructive", and keyValueSeparator = "=", all of the following Strings will parse to a TransitionMetaData with beforeState="1.0.4", afterState="1.0.5", and isDestructive=true:
Since newlines are ignored as whitespace, the following block parsed as a String also returns the same TransitionMetaData as above: as does this block:transition-before = 1.0.4 transition-after = 1.0.5 transition-destructive = trueAuthor:
Eric Evans