|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectParsingFramework.ParserFramework
public class ParserFramework
Singleton object which provides operations to parse data in raw formats e.g. in byte arrays or bitsets into typed Java objects.
| Field Summary | |
|---|---|
static java.util.Map<java.lang.String,OperationHost> |
functionList
|
static java.util.Map<java.lang.String,OperationHost> |
operationList
Local database of objects that host operations for parsing data into types. |
| Constructor Summary | |
|---|---|
protected |
ParserFramework()
Constructor. |
| Method Summary | |
|---|---|
java.lang.Object |
composeTypedValue(java.lang.String dataType,
java.lang.Object dataValue,
int size)
Composes the representation of the data type to be used in the message format. |
java.lang.Object |
decode(java.lang.String function,
java.lang.Object dataField)
|
java.lang.Object |
getConstantValue(java.lang.String type,
java.lang.String constant)
|
java.lang.Object |
getFunctionResult(java.lang.String function)
|
java.lang.Object |
getFunctionResult(java.lang.String function,
java.lang.Object parameter)
|
static ParserFramework |
getInstance()
|
java.lang.Object |
getTextTypedValue(java.lang.String dataType,
java.lang.Object dataValue)
|
java.lang.Object |
getTypedValue(java.lang.String dataType,
java.lang.Object dataValue)
Convert the data in the dataValue parameter into a Java object that matches the dataType provided. |
byte[] |
toByteArray(java.util.BitSet bits)
local operation that transforms an array of bits into an array of bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.util.Map<java.lang.String,OperationHost> operationList
public static java.util.Map<java.lang.String,OperationHost> functionList
| Constructor Detail |
|---|
protected ParserFramework()
| Method Detail |
|---|
public static ParserFramework getInstance()
public byte[] toByteArray(java.util.BitSet bits)
toByteArray in interface IParseOperationsbits - BitSet to convert to a binary array
public java.lang.Object getTypedValue(java.lang.String dataType,
java.lang.Object dataValue)
throws TypeNotFoundException
getTypedValue in interface IParseOperationsdataType - Required type to be produceddataValue - The raw data to be parsed
TypeNotFoundException
public java.lang.Object getTextTypedValue(java.lang.String dataType,
java.lang.Object dataValue)
throws TypeNotFoundException
getTextTypedValue in interface IParseOperationsTypeNotFoundException
public java.lang.Object composeTypedValue(java.lang.String dataType,
java.lang.Object dataValue,
int size)
throws TypeNotFoundException
composeTypedValue in interface IParseOperationsdataType - Required type to be composeddataValue - The current object value to be marshalledsize - The length of the data to be created e.g. (2 byte for int)
TypeNotFoundException
public java.lang.Object getConstantValue(java.lang.String type,
java.lang.String constant)
getConstantValue in interface IParseOperations
public java.lang.Object getFunctionResult(java.lang.String function,
java.lang.Object parameter)
getFunctionResult in interface IParseOperationspublic java.lang.Object getFunctionResult(java.lang.String function)
getFunctionResult in interface IParseOperations
public java.lang.Object decode(java.lang.String function,
java.lang.Object dataField)
throws TypeNotFoundException
decode in interface IParseOperationsTypeNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||