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>
    T
    decode​(java.lang.String input, int offset, java.lang.Class<T> type)  
    static <T extends Type>
    T
    decodeDynamicArray​(java.lang.String input, int offset, java.lang.reflect.Type type)  
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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 decoded
      offset - the size of the staticArray need to be decoded
      type - the type of the result
      length - 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)