Class Types

java.lang.Object
libcore.reflect.Types

public final class Types
extends Object
  • Method Details

    • getTypeArray

      public static Type[] getTypeArray​(ListOfTypes types, boolean clone)
    • getType

      public static Type getType​(Type type)
    • getSignature

      public static String getSignature​(Class<?> clazz)
      Returns the internal name of clazz (also known as the descriptor).
    • toString

      public static String toString​(Class<?>[] types)
      Returns the names of types separated by commas.
    • appendTypeName

      public static void appendTypeName​(StringBuilder out, Class<?> c)
      Appends the best toString(java.lang.Class<?>[]) name for c to out. This works around the fact that Class.getName() is lousy for primitive arrays (it writes "[C" instead of "char[]") and Class.getCanonicalName() is lousy for nested classes (it uses a "." separator rather than a "$" separator).
    • appendArrayGenericType

      public static void appendArrayGenericType​(StringBuilder out, Type[] types)
      Appends names of the types to out separated by commas.
    • appendGenericType

      public static void appendGenericType​(StringBuilder out, Type type)