Package libcore.reflect
Class Types
java.lang.Object
libcore.reflect.Types
public final class Types extends Object
-
Method Summary
Modifier and Type Method Description static voidappendArrayGenericType(StringBuilder out, Type[] types)Appends names of thetypestooutseparated by commas.static voidappendGenericType(StringBuilder out, Type type)static voidappendTypeName(StringBuilder out, Class<?> c)static StringgetSignature(Class<?> clazz)Returns the internal name ofclazz(also known as the descriptor).static TypegetType(Type type)static Type[]getTypeArray(ListOfTypes types, boolean clone)static StringtoString(Class<?>[] types)Returns the names oftypesseparated by commas.
-
Method Details
-
getTypeArray
-
getType
-
getSignature
Returns the internal name ofclazz(also known as the descriptor). -
toString
Returns the names oftypesseparated by commas. -
appendTypeName
Appends the besttoString(java.lang.Class<?>[])name forctoout. This works around the fact thatClass.getName()is lousy for primitive arrays (it writes "[C" instead of "char[]") andClass.getCanonicalName()is lousy for nested classes (it uses a "." separator rather than a "$" separator). -
appendArrayGenericType
Appends names of thetypestooutseparated by commas. -
appendGenericType
-