Static
chainedReturns an extractor that extracts the specified fields or extractors where extraction occurs in a chain where the result of each field extraction is the input to the next extractor. The result returned is the result of the final extractor in the chain.
an extractor that extracts the value(s) of the specified field(s)
If extractorsOrFields is a string type, then the field names to extract (if any field name contains a dot '.' that field name is split into multiple field names delimiting on the dots. If extractorsOrFields is of ValueExtractor[] type, then the ValueExtractors are used to extract the values
Static
extractReturns an extractor that extracts the value of the specified field.
an extractor that extracts the value of the specified field.
the name of the field or method to extract the value from.
Optional
params: any[]the parameters to pass to the method.
Static
identityReturns an extractor that always returns its input argument.
an extractor that always returns its input argument
Static
identityReturns an extractor that casts its input argument.
an extractor that always returns its input argument
Static
multiReturns an extractor that extracts the specified fields and returns the extracted values in an array.
an extractor that extracts the value(s) of the specified field(s)
the field names to extract
Simple Extractor DSL.
Remarks
The methods in this class are for the most part simple factory methods for various ValueExtractor classes, but in some cases provide additional type safety. They also tend to make the code more readable, especially if imported statically, so their use is strongly encouraged in lieu of direct construction of ValueExtractor classes.