public class TypeUtils extends Object
Constructor and Description |
---|
TypeUtils() |
Modifier and Type | Method and Description |
---|---|
static Class |
dliTypeToJavaType(DataType type) |
static DliArray |
makeArray(ArrayTypeInfo typeInfo,
String data)
Make a DliArray object form the JSON string
|
static DliMap |
makeMap(MapTypeInfo typeInfo,
String data)
Make a DliMap object form the JSON string
|
static DliStruct |
makeStruct(StructTypeInfo typeInfo,
String data)
Make a DliStruct object form the JSON string
|
static Object |
transform(String data,
DataTypeInfo valueTypeInfo)
Transform the data value from string to real data type in java
|
public static DliStruct makeStruct(StructTypeInfo typeInfo, String data)
typeInfo
- The data type info of the DliStruct objectdata
- The DliStruct data value in JSON string formatpublic static DliArray makeArray(ArrayTypeInfo typeInfo, String data)
typeInfo
- The data type info of the DliArray objectdata
- The DliArray data value in JSON string formatpublic static DliMap makeMap(MapTypeInfo typeInfo, String data)
typeInfo
- The data type info of the DliMap objectdata
- The DliMap data value in JSON string formatpublic static Object transform(String data, DataTypeInfo valueTypeInfo) throws DLIException
data
- The data value in string typevalueTypeInfo
- The type info of the dataDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyCopyright © 2023. All rights reserved.