Package com.pixelservices.flash.utils
Class Parser
java.lang.Object
com.pixelservices.flash.utils.Parser
The Parser class provides methods to parse fields to specific types.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
parseField
(Object fieldValue, Class<T> clazz, Consumer<Exception> onError) Parse a field to a specific type.
-
Constructor Details
-
Parser
public Parser()
-
-
Method Details
-
parseField
Parse a field to a specific type.- Type Parameters:
T
- the type to parse the field to- Parameters:
fieldValue
- the field value to parseclazz
- the class to parse the field toonError
- the error handler- Returns:
- the parsed field
-