Class Utils

java.lang.Object
org.fisco.bcos.sdk.abi.Utils

public class Utils
extends java.lang.Object
Utility functions.
  • Method Summary

    Modifier and Type Method Description
    static java.util.List<TypeReference<Type>> convert​(java.util.List<TypeReference<?>> input)  
    static <T extends Type>
    boolean
    dynamicType​(java.lang.reflect.Type type)  
    static <T extends Type>
    java.lang.Class<T>
    getClassType​(java.lang.reflect.Type type)  
    static int getLength​(java.util.List<Type> parameters)  
    static <T extends Type>
    int
    getOffset​(java.lang.reflect.Type type)  
    static <T extends Type>
    java.lang.String
    getTypeName​(java.lang.reflect.Type type)  
    static <T extends Type>
    java.lang.String
    getTypeName​(TypeReference<T> typeReference)  
    static <T,​ R extends Type<T>,​ E extends Type<T>>
    java.util.List<E>
    typeMap​(java.util.List<java.util.List<T>> input, java.lang.Class<E> outerDestType, java.lang.Class<R> innerType)  
    static <T,​ R extends Type<T>>
    java.util.List<R>
    typeMap​(java.util.List<T> input, java.lang.Class<R> destType)  
    static java.util.List typeMapWithoutGenericType​(java.util.List input, java.lang.Class destType)  

    Methods inherited from class java.lang.Object

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

    • getTypeName

      public static <T extends Type> java.lang.String getTypeName​(TypeReference<T> typeReference)
    • getTypeName

      public static <T extends Type> java.lang.String getTypeName​(java.lang.reflect.Type type)
    • dynamicType

      public static <T extends Type> boolean dynamicType​(java.lang.reflect.Type type) throws java.lang.ClassNotFoundException
      Throws:
      java.lang.ClassNotFoundException
    • getLength

      public static int getLength​(java.util.List<Type> parameters)
    • getOffset

      public static <T extends Type> int getOffset​(java.lang.reflect.Type type) throws java.lang.ClassNotFoundException
      Throws:
      java.lang.ClassNotFoundException
    • getClassType

      public static <T extends Type> java.lang.Class<T> getClassType​(java.lang.reflect.Type type) throws java.lang.ClassNotFoundException
      Throws:
      java.lang.ClassNotFoundException
    • convert

      public static java.util.List<TypeReference<Type>> convert​(java.util.List<TypeReference<?>> input)
    • typeMap

      public static <T,​ R extends Type<T>,​ E extends Type<T>> java.util.List<E> typeMap​(java.util.List<java.util.List<T>> input, java.lang.Class<E> outerDestType, java.lang.Class<R> innerType)
    • typeMap

      public static <T,​ R extends Type<T>> java.util.List<R> typeMap​(java.util.List<T> input, java.lang.Class<R> destType) throws TypeMappingException
      Throws:
      TypeMappingException
    • typeMapWithoutGenericType

      public static java.util.List typeMapWithoutGenericType​(java.util.List input, java.lang.Class destType) throws TypeMappingException
      Throws:
      TypeMappingException