public class LogUtil extends Object
Constructor and Description |
---|
LogUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
deepToString(Object object)
Returns a compact string representation of the "deep contents" of the specified
object.
|
static String |
hideCredentials(Object o)
Hides credentials by replacing them with asterisks.
|
static String |
printArray(boolean[] objects)
Returns a compact string representation of the "deep contents" of the specified
array.
|
static String |
printArray(byte[] objects)
Returns a compact string representation of the "deep contents" of the specified
array.
|
static String |
printArray(char[] objects)
Returns a compact string representation of the "deep contents" of the specified
array.
|
static String |
printArray(double[] objects)
Returns a compact string representation of the "deep contents" of the specified
array.
|
static String |
printArray(float[] objects)
Returns a compact string representation of the "deep contents" of the specified
array.
|
static String |
printArray(int[] objects)
Returns a compact string representation of the "deep contents" of the specified
array.
|
static String |
printArray(long[] objects)
Returns a compact string representation of the "deep contents" of the specified
array.
|
static String |
printArray(Object[] objects)
Returns a compact string representation of the "deep contents" of the specified
array.
|
static String |
printArray(short[] objects)
Returns a compact string representation of the "deep contents" of the specified
array.
|
static String |
printCollection(Collection<?> collection)
Returns a compact string representation of the "deep contents" of the specified
collection.
|
static String |
printMap(Map<?,?> map)
Returns a compact string representation of the "deep contents" of the specified
Map.
|
public static String hideCredentials(Object o)
o
- the object with credentials in string representationpublic static String deepToString(Object object)
This method always prints at least 10 elements in a collection, map, or array and truncates the string representation of object at 120 characters.
object
- the object whose string representation to returnpublic static String printMap(Map<?,?> map)
This method always prints at least 10 elements in a map and truncates the string representation of object at 120 characters.
map
- the map whose string representation to returnpublic static String printCollection(Collection<?> collection)
This method always prints at least 10 elements in a collection and truncates the string representation of object at 120 characters.
collection
- the collection whose string representation to returnpublic static String printArray(Object[] objects)
This method always prints at least 10 elements in an array and truncates the string representation of object at 120 characters.
objects
- the array whose string representation to returnpublic static String printArray(boolean[] objects)
This method always prints at least 10 elements in an array and truncates the string representation of object at 120 characters.
objects
- the array whose string representation to returnpublic static String printArray(byte[] objects)
This method always prints at least 10 elements in an array and truncates the string representation of object at 120 characters.
objects
- the array whose string representation to returnpublic static String printArray(short[] objects)
This method always prints at least 10 elements in an array and truncates the string representation of object at 120 characters.
objects
- the array whose string representation to returnpublic static String printArray(int[] objects)
This method always prints at least 10 elements in an array and truncates the string representation of object at 120 characters.
objects
- the array whose string representation to returnpublic static String printArray(char[] objects)
This method always prints at least 10 elements in an array and truncates the string representation of object at 120 characters.
objects
- the array whose string representation to returnpublic static String printArray(long[] objects)
This method always prints at least 10 elements in an array and truncates the string representation of object at 120 characters.
objects
- the array whose string representation to returnpublic static String printArray(float[] objects)
This method always prints at least 10 elements in an array and truncates the string representation of object at 120 characters.
objects
- the array whose string representation to returnpublic static String printArray(double[] objects)
This method always prints at least 10 elements in an array and truncates the string representation of object at 120 characters.
objects
- the array whose string representation to returnCopyright © 2002–2025 Devexperts LLC. All rights reserved.