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 intinclude the class name in the resultstatic final intinclude 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 voidAppend a string to the internal bufferprotected voidappendChar(char ch) Append the hash code.protected voidappendClassName(Object target) Append the class name.protected voidappendHashCode(Object target) Append the hash code.protected StringFormat the buffer by replacing the whitespaces and cutting away excessive fluff.protected intintgetMode()protected StringgetStackTrace(Throwable throwable) Gets the stack trace from a Throwable as a String.voidsetMaxArgLength(int maxArgLength) voidsetMode(int mode) voidtoString()protected StringtoString(boolean[] array) Create a string representation of a boolean[].protected StringtoString(byte[] array) Create a string representation of a char[].protected StringtoString(char[] array) Create a string representation of a char[].protected StringtoString(double[] array) Create a string representation of a double[].protected StringtoString(float[] array) Create a string representation of a float[].protected StringtoString(int[] array) Create a string representation of a int[].protected StringtoString(long[] array) Create a string representation of a char[].protected StringtoString(short[] array) Create a string representation of a short[].protected StringCreate a String representation for an arbitrary object.protected StringCreate a string representation of an object array.protected StringCreate a string representation of a String.protected StringCreate a String representation for a Throwable.protected StringtoString(Collection<?> collection) Create a string representation of a java.util.Collection.protected StringtoString(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:
setMaxArgLengthin SchnittstelleInterceptorToStringBuilder- Parameter:
maxArgLength- The maxArgLength to set.- Siehe auch:
-
setTarget
- Angegeben von:
setTargetin SchnittstelleInterceptorToStringBuilder- Parameter:
target- The target to set.- Siehe auch:
-
setMode
public void setMode(int mode) - Angegeben von:
setModein 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- theThrowableto 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
-