|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fulcrum.yaafi.interceptor.util.ArgumentToStringBuilderImpl
public class ArgumentToStringBuilderImpl
Creates a string representation of method argument.
| Field Summary | |
|---|---|
static int |
INCLUDE_CLASSNAME
include the class name in the result |
static int |
INCLUDE_HASHCODE
include the hashcode in the result |
| Constructor Summary | |
|---|---|
ArgumentToStringBuilderImpl()
Constructor |
|
ArgumentToStringBuilderImpl(Object target)
Constructor |
|
ArgumentToStringBuilderImpl(Object target,
int maxArgLength)
Constructor |
|
ArgumentToStringBuilderImpl(Object target,
int maxArgLength,
int mode)
Constructor |
|
| Method Summary | |
|---|---|
protected void |
append(String source)
Append a string to the internal buffer |
protected 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(String source)
Format the buffer by replacing the whitespaces and cutting away excessive fluff. |
protected int |
getMaxArgLength()
|
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 |
setTarget(Object target)
|
String |
toString()
Invokes the string builder. |
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(Collection collection)
Create a string representation of a java.util.Collection. |
protected String |
toString(Dictionary dictionary)
Create a string representation of a Dictionary. |
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(Object object)
Create a String representation for an arbitrary object. |
protected String |
toString(Object[] array)
Create a string representation of an object array. |
protected String |
toString(short[] array)
Create a string representation of a short[]. |
protected String |
toString(String string)
Create a string representation of a String. |
protected String |
toString(Throwable throwable)
Create a String representation for a Throwable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int INCLUDE_CLASSNAME
public static final int INCLUDE_HASHCODE
| Constructor Detail |
|---|
public ArgumentToStringBuilderImpl()
public ArgumentToStringBuilderImpl(Object target)
target - the object to print
public ArgumentToStringBuilderImpl(Object target,
int maxArgLength)
target - the object to printmaxArgLength - the maximum length
public ArgumentToStringBuilderImpl(Object target,
int maxArgLength,
int mode)
target - the object to printmaxArgLength - the maximum lengthmode - the formatting mode to use| Method Detail |
|---|
public void setMaxArgLength(int maxArgLength)
setMaxArgLength in interface InterceptorToStringBuildermaxArgLength - The maxArgLength to set.InterceptorToStringBuilder.setMaxArgLength(int)public void setTarget(Object target)
setTarget in interface InterceptorToStringBuildertarget - The target to set.InterceptorToStringBuilder.setTarget(java.lang.Object)public void setMode(int mode)
setMode in interface InterceptorToStringBuildermode - Set the formatting mode to useInterceptorToStringBuilder.setMode(int)public int getMode()
public String toString()
InterceptorToStringBuilder
toString in interface InterceptorToStringBuildertoString in class ObjectObject.toString()protected String toString(Throwable throwable)
throwable - the Throwable
protected String toString(Object[] array)
array - the array to print
protected String toString(boolean[] array)
array - the array to print
protected String toString(char[] array)
array - the array to print
protected String toString(short[] array)
array - the array to print
protected String toString(int[] array)
array - the array to print
protected String toString(long[] array)
array - the array to print
protected String toString(float[] array)
array - the array to print
protected String toString(double[] array)
array - the array to print
protected String toString(String string)
string - the string to printprotected String toString(byte[] array)
array - the array to print
protected String toString(Collection collection)
collection - the collection to print
protected String toString(Dictionary dictionary)
dictionary - the collection to print
protected String toString(Object object)
object - the object
protected void appendHashCode(Object target)
target - the object to printprotected void appendClassName(Object target)
target - the object to printprotected void appendChar(char ch)
ch - the object to printprotected int getMaxArgLength()
protected String getStackTrace(Throwable throwable)
Gets the stack trace from a Throwable as a String.
throwable - the Throwable to be examined
printStackTrace(PrintWriter) methodprotected void append(String source)
source - the string to appendprotected String format(String source)
source - the source string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||