public class ItemProcessor extends EntryProcessor<ItemTO<?>>
ItemTO's to parse and format them from and into positional string data.
This class should be instantiated using EntryProcessor.getInstance(net.sf.layoutParser.to.EntryTO).entry| Modifier | Constructor and Description |
|---|---|
protected |
ItemProcessor(ItemTO<?> entry)
Protected constructor used by
EntryProcessor.getInstance(net.sf.layoutParser.to.EntryTO) |
| Modifier and Type | Method and Description |
|---|---|
String |
format(Object field)
Formats the field using
EntryProcessor.entry information. |
Object |
parse(String data)
Parses the field using
EntryProcessor.entry information. |
getInstanceprotected ItemProcessor(ItemTO<?> entry)
EntryProcessor.getInstance(net.sf.layoutParser.to.EntryTO)entry - The object containing all information regarding the ItemTO that is going to be used to parse or format data.public String format(Object field) throws MalformedOutputException
EntryProcessor.entry information. EntryTO.getType() should have a TypeHandler that handles this kind of "type". ItemTO.getMaskName() to retrieve a MaskTO and format in class EntryProcessor<ItemTO<?>>field - The object that should be parsedMalformedOutputException - In case there's a problem formating the field into a positional data stringEntryProcessor.format(java.lang.Object),
TypeHandler.format(Object, String, String, int)public Object parse(String data) throws MalformedInputException
EntryProcessor.entry information. ItemTO.getMaskName().
The job of parsing is done by calling TypeHandler#parse(data, format), so in order EntryTO.getType() should have a TypeHandler that handles this kind of "type". parse in class EntryProcessor<ItemTO<?>>data - Textual raw data to be parsed.EntryTO.getType().MalformedInputException - In case there's a problem parsing the data.EntryProcessor.parse(java.lang.String),
TypeHandler.parse(String, String, String)Copyright © 2014. All Rights Reserved.