public class Pretty extends Object
toString method.| Modifier and Type | Method and Description |
|---|---|
static String |
array(Object[] array)
Returns a pretty string for the given array.
|
static String |
clazz(Class<?> clazz)
Makes a nice, pretty class (without the package name).
|
static String |
collection(Collection<?> collection)
Returns a pretty string representing the collection.
|
static String |
constructor(Constructor<?> constructor)
Make a nice pretty string out of the constructor and all its parameters.
|
static String |
field(Field field)
Returns a pretty string representing a Field.
|
static String |
method(Method method)
Makes a nice pretty string of the method, with the method name and all parameters.
|
static String |
pType(ParameterizedType pType)
Prints a pretty parameterized type.
|
static String |
type(Type t)
Returns a pretty string for the given type.
|
public static String clazz(Class<?> clazz)
clazz - Make me a pretty class.public static String pType(ParameterizedType pType)
pType - The parameterized type to print. May not be null.public static String type(Type t)
t - A possibly null type.public static String constructor(Constructor<?> constructor)
constructor - The constructor to make pretty.public static String method(Method method)
method - The method to make pretty.public static String field(Field field)
field - The possibly null field.public static String array(Object[] array)
array - The possibly null array to represent.public static String collection(Collection<?> collection)
collection - A possibly null collection to represent.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.