public final class Types extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
appendArrayGenericType(StringBuilder out,
Type[] types)
Appends names of the
types to out separated by commas. |
static void |
appendGenericType(StringBuilder out,
Type type) |
static void |
appendTypeName(StringBuilder out,
Class<?> c)
|
static String |
getSignature(Class<?> clazz)
Returns the internal name of
clazz (also known as the descriptor). |
static Type |
getType(Type type) |
static Type[] |
getTypeArray(ListOfTypes types,
boolean clone) |
static String |
toString(Class<?>[] types)
Returns the names of
types separated by commas. |
public static Type[] getTypeArray(ListOfTypes types, boolean clone)
public static String getSignature(Class<?> clazz)
clazz (also known as the descriptor).public static String toString(Class<?>[] types)
types separated by commas.public static void appendTypeName(StringBuilder out, Class<?> c)
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).public static void appendArrayGenericType(StringBuilder out, Type[] types)
types to out separated by commas.public static void appendGenericType(StringBuilder out, Type type)