Klasse ArgumentToStringBuilderImpl
java.lang.Object
org.apache.fulcrum.yaafi.interceptor.util.ArgumentToStringBuilderImpl
- Alle implementierten Schnittstellen:
InterceptorToStringBuilder
Creates a string representation of method argument.
- Autor:
- Siegfried Goeschl
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final int
include the class name in the resultstatic final int
include the hashcode in the result -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungConstructorArgumentToStringBuilderImpl
(Object target) ConstructorArgumentToStringBuilderImpl
(Object target, int maxArgLength) ConstructorArgumentToStringBuilderImpl
(Object target, int maxArgLength, int mode) Constructor -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected void
Append a string to the internal bufferprotected void
appendChar
(char ch) Append the hash code.protected void
appendClassName
(Object target) Append the class name.protected void
appendHashCode
(Object target) Append the hash code.protected String
Format the buffer by replacing the whitespaces and cutting away excessive fluff.protected int
int
getMode()
protected String
getStackTrace
(Throwable throwable) Gets the stack trace from a Throwable as a String.void
setMaxArgLength
(int maxArgLength) void
setMode
(int mode) void
toString()
protected String
toString
(boolean[] array) Create a string representation of a boolean[].protected String
toString
(byte[] array) Create a string representation of a char[].protected String
toString
(char[] array) Create a string representation of a char[].protected String
toString
(double[] array) Create a string representation of a double[].protected String
toString
(float[] array) Create a string representation of a float[].protected String
toString
(int[] array) Create a string representation of a int[].protected String
toString
(long[] array) Create a string representation of a char[].protected String
toString
(short[] array) Create a string representation of a short[].protected String
Create a String representation for an arbitrary object.protected String
Create a string representation of an object array.protected String
Create a string representation of a String.protected String
Create a String representation for a Throwable.protected String
toString
(Collection<?> collection) Create a string representation of a java.util.Collection.protected String
toString
(Dictionary<?, ?> dictionary) Create a string representation of a Dictionary.
-
Felddetails
-
INCLUDE_CLASSNAME
public static final int INCLUDE_CLASSNAMEinclude the class name in the result- Siehe auch:
-
INCLUDE_HASHCODE
public static final int INCLUDE_HASHCODEinclude the hashcode in the result- Siehe auch:
-
-
Konstruktordetails
-
ArgumentToStringBuilderImpl
public ArgumentToStringBuilderImpl()Constructor -
ArgumentToStringBuilderImpl
Constructor- Parameter:
target
- the object to print
-
ArgumentToStringBuilderImpl
Constructor- Parameter:
target
- the object to printmaxArgLength
- the maximum length
-
ArgumentToStringBuilderImpl
Constructor- Parameter:
target
- the object to printmaxArgLength
- the maximum lengthmode
- the formatting mode to use
-
-
Methodendetails
-
setMaxArgLength
public void setMaxArgLength(int maxArgLength) - Angegeben von:
setMaxArgLength
in SchnittstelleInterceptorToStringBuilder
- Parameter:
maxArgLength
- The maxArgLength to set.- Siehe auch:
-
setTarget
- Angegeben von:
setTarget
in SchnittstelleInterceptorToStringBuilder
- Parameter:
target
- The target to set.- Siehe auch:
-
setMode
public void setMode(int mode) - Angegeben von:
setMode
in SchnittstelleInterceptorToStringBuilder
- Parameter:
mode
- Set the formatting mode to use- Siehe auch:
-
getMode
public int getMode()- Gibt zurück:
- Returns the mode.
-
toString
-
toString
Create a String representation for a Throwable.- Parameter:
throwable
- the Throwable- Gibt zurück:
- the string representation
-
toString
Create a string representation of an object array.- Parameter:
array
- the array to print- Gibt zurück:
- the result
-
toString
Create a string representation of a boolean[].- Parameter:
array
- the array to print- Gibt zurück:
- the result
-
toString
Create a string representation of a char[].- Parameter:
array
- the array to print- Gibt zurück:
- the result
-
toString
Create a string representation of a short[].- Parameter:
array
- the array to print- Gibt zurück:
- the result
-
toString
Create a string representation of a int[].- Parameter:
array
- the array to print- Gibt zurück:
- the result
-
toString
Create a string representation of a char[].- Parameter:
array
- the array to print- Gibt zurück:
- the result
-
toString
Create a string representation of a float[].- Parameter:
array
- the array to print- Gibt zurück:
- the result
-
toString
Create a string representation of a double[].- Parameter:
array
- the array to print- Gibt zurück:
- the result
-
toString
Create a string representation of a String.- Parameter:
string
- the string to print- Gibt zurück:
- the result
-
toString
Create a string representation of a char[].- Parameter:
array
- the array to print- Gibt zurück:
- the result
-
toString
Create a string representation of a java.util.Collection.- Parameter:
collection
- the collection to print- Gibt zurück:
- the result
-
toString
Create a string representation of a Dictionary.- Parameter:
dictionary
- the collection to print- Gibt zurück:
- the result
-
toString
Create a String representation for an arbitrary object.- Parameter:
object
- the object- Gibt zurück:
- string representation
-
appendHashCode
Append the hash code.- Parameter:
target
- the object to print
-
appendClassName
Append the class name.- Parameter:
target
- the object to print
-
appendChar
protected void appendChar(char ch) Append the hash code.- Parameter:
ch
- the object to print
-
getMaxArgLength
protected int getMaxArgLength()- Gibt zurück:
- Returns the maxLineLength.
-
getStackTrace
Gets the stack trace from a Throwable as a String.
- Parameter:
throwable
- theThrowable
to be examined- Gibt zurück:
- the stack trace as generated by the exception's
printStackTrace(PrintWriter)
method
-
append
Append a string to the internal buffer- Parameter:
source
- the string to append
-
format
Format the buffer by replacing the whitespaces and cutting away excessive fluff.- Parameter:
source
- the source string- Gibt zurück:
- formatted string
-