public class Debug extends Object
Constructor and Description |
---|
Debug() |
Modifier and Type | Method and Description |
---|---|
static String |
abbreviatedName(Class<?> c)
Returns a compact representation of the fully-qualified name of the given class.
|
static String |
objectId(Object o)
Composes a compact, memorable unique string for the given object instance.
|
static String |
shortName(Class<?> c)
Returns the short name of the given class (no package name).
|
static String |
toMemorableString(long num)
Makes a reasonably easy-to-pronounce gibberish word from the given number.
|
public static String toMemorableString(long num)
num
- The number to convert.public static String objectId(Object o)
abbreviatedName(Class)
), an '@' character, then a gibberish word
representing the object's identity hash code (see toMemorableString(long)
).o
- public static String abbreviatedName(Class<?> c)
For classes in the default package, items 1 and 2 are omitted.
c
- the class whose name to abbreviate. Can be null, but will result in a null return value.public static String shortName(Class<?> c)
c
- the class whose name to abbreviate. Can be null, but will result in a null return value.Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.