public class Parser<RECORD> extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addDissector(Dissector dissector) |
void |
addDissectors(List<Dissector> dissectors) |
void |
addParseTarget(Method method,
List<String> fieldValues) |
void |
addParseTarget(Method method,
String fieldValue) |
void |
addTypeRemapping(String input,
String newType) |
void |
addTypeRemapping(String input,
String newType,
EnumSet<Casts> newCasts) |
void |
addTypeRemappings(Map<String,Set<String>> additionalTypeRemappings) |
static String |
cleanupFieldValue(String fieldValue) |
Parsable<RECORD> |
createParsable() |
void |
dropDissector(Class<? extends Dissector> dissectorClassToDrop) |
Map<String,EnumSet<Casts>> |
getAllCasts() |
EnumSet<Casts> |
getCasts(String name) |
Set<String> |
getNeeded() |
List<String> |
getPossiblePaths()
This method is for use by the developer to query the parser about
the possible paths that may be extracted.
|
List<String> |
getPossiblePaths(int maxDepth)
This method is for use by the developer to query the parser about
the possible paths that may be extracted.
|
RECORD |
parse(RECORD record,
String value)
Parse the value and call all configured setters in the provided instance of RECORD.
|
RECORD |
parse(String value)
Parse the value and return a new instance of RECORD.
|
protected void |
setRootType(String newRootType) |
void |
setTypeRemappings(Map<String,Set<String>> pTypeRemappings) |
public final void addDissector(Dissector dissector)
protected void setRootType(String newRootType)
public void addTypeRemapping(String input, String newType, EnumSet<Casts> newCasts)
public RECORD parse(String value) throws DissectionFailure, InvalidDissectorException, MissingDissectorsException
public RECORD parse(RECORD record, String value) throws DissectionFailure, InvalidDissectorException, MissingDissectorsException
public List<String> getPossiblePaths() throws MissingDissectorsException, InvalidDissectorException
InvalidDissectorExceptionMissingDissectorsExceptionpublic List<String> getPossiblePaths(int maxDepth)
maxDepth - The maximum recursion depthCopyright © 2015. All Rights Reserved.