Class TypeDecoder


  • public class TypeDecoder
    extends java.lang.Object
    Contract Application Binary Interface (ABI) decoding for types. Decoding is not documented, but is the reverse of the encoding details located here.
    • Constructor Detail

      • TypeDecoder

        public TypeDecoder()
    • Method Detail

      • instantiateType

        public static Type instantiateType​(java.lang.String solidityType,
                                           java.lang.Object value)
                                    throws java.lang.reflect.InvocationTargetException,
                                           java.lang.NoSuchMethodException,
                                           java.lang.InstantiationException,
                                           java.lang.IllegalAccessException,
                                           java.lang.ClassNotFoundException
        Throws:
        java.lang.reflect.InvocationTargetException
        java.lang.NoSuchMethodException
        java.lang.InstantiationException
        java.lang.IllegalAccessException
        java.lang.ClassNotFoundException
      • instantiateType

        public static Type instantiateType​(TypeReference ref,
                                           java.lang.Object value)
                                    throws java.lang.NoSuchMethodException,
                                           java.lang.IllegalAccessException,
                                           java.lang.reflect.InvocationTargetException,
                                           java.lang.InstantiationException,
                                           java.lang.ClassNotFoundException
        Throws:
        java.lang.NoSuchMethodException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
        java.lang.InstantiationException
        java.lang.ClassNotFoundException
      • decode

        public static <T extends Array> T decode​(java.lang.String input,
                                                 int offset,
                                                 TypeReference<T> typeReference)
      • decodeStaticStruct

        public static <T extends Type> T decodeStaticStruct​(java.lang.String input,
                                                            int offset,
                                                            TypeReference<T> typeReference)
                                                     throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException