Package org.fisco.bcos.sdk.abi
Class TypeDecoder
java.lang.Object
org.fisco.bcos.sdk.abi.TypeDecoder
public class TypeDecoder
extends java.lang.Object
Ethereum Contract Application Binary Interface (ABI) decoding for types. Decoding is not
documented, but is the reverse of the encoding details located here.
-
Constructor Summary
Constructors Constructor Description TypeDecoder()
-
Method Summary
Modifier and Type Method Description static <T extends Type>
Tdecode(java.lang.String input, int offset, java.lang.Class<T> type)
static <T extends Type>
TdecodeDynamicArray(java.lang.String input, int offset, java.lang.reflect.Type type)
static <T extends Type>
TdecodeStaticArray(java.lang.String input, int offset, java.lang.reflect.Type type, int length)
Decode the staticArray Static array length cannot be passed as a type
-
Constructor Details
-
TypeDecoder
public TypeDecoder()
-
-
Method Details
-
decode
public static <T extends Type> T decode(java.lang.String input, int offset, java.lang.Class<T> type) -
decodeStaticArray
public static <T extends Type> T decodeStaticArray(java.lang.String input, int offset, java.lang.reflect.Type type, int length)Decode the staticArray Static array length cannot be passed as a type- Type Parameters:
T
- the generic type- Parameters:
input
- the staticArray need to be decodedoffset
- the size of the staticArray need to be decodedtype
- the type of the resultlength
- the length of array- Returns:
- the decoded result
-
decodeDynamicArray
public static <T extends Type> T decodeDynamicArray(java.lang.String input, int offset, java.lang.reflect.Type type)
-