|
||||||||||
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(java.lang.Object target)
Constructor |
|
ArgumentToStringBuilderImpl(java.lang.Object target,
int maxArgLength)
Constructor |
|
ArgumentToStringBuilderImpl(java.lang.Object target,
int maxArgLength,
int mode)
Constructor |
Method Summary | |
---|---|
protected void |
append(java.lang.String source)
Append a string to the internal buffer |
protected void |
appendChar(char ch)
Append the hash code. |
protected void |
appendClassName(java.lang.Object target)
Append the class name. |
protected void |
appendHashCode(java.lang.Object target)
Append the hash code. |
protected java.lang.String |
format(java.lang.String source)
Format the buffer by replacing the whitespaces and cutting away excessive fluff. |
protected int |
getMaxArgLength()
|
int |
getMode()
|
protected java.lang.String |
getStackTrace(java.lang.Throwable throwable)
Gets the stack trace from a Throwable as a String. |
void |
setMaxArgLength(int maxArgLength)
|
void |
setMode(int mode)
|
void |
setTarget(java.lang.Object target)
|
java.lang.String |
toString()
Invokes the string builder. |
protected java.lang.String |
toString(boolean[] array)
Create a string representation of a boolean[]. |
protected java.lang.String |
toString(byte[] array)
Create a string representation of a char[]. |
protected java.lang.String |
toString(char[] array)
Create a string representation of a char[]. |
protected java.lang.String |
toString(java.util.Collection collection)
Create a string representation of a java.util.Collection. |
protected java.lang.String |
toString(java.util.Dictionary dictionary)
Create a string representation of a Dictionary. |
protected java.lang.String |
toString(double[] array)
Create a string representation of a double[]. |
protected java.lang.String |
toString(float[] array)
Create a string representation of a float[]. |
protected java.lang.String |
toString(int[] array)
Create a string representation of a int[]. |
protected java.lang.String |
toString(long[] array)
Create a string representation of a char[]. |
protected java.lang.String |
toString(java.lang.Object object)
Create a String representation for an arbitrary object. |
protected java.lang.String |
toString(java.lang.Object[] array)
Create a string representation of an object array. |
protected java.lang.String |
toString(short[] array)
Create a string representation of a short[]. |
protected java.lang.String |
toString(java.lang.String string)
Create a string representation of a String. |
protected java.lang.String |
toString(java.lang.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(java.lang.Object target)
target
- the object to printpublic ArgumentToStringBuilderImpl(java.lang.Object target, int maxArgLength)
target
- the object to printmaxArgLength
- the maximum lengthpublic ArgumentToStringBuilderImpl(java.lang.Object target, int maxArgLength, int mode)
target
- the object to printmaxArgLength
- the maximum lengthmode
- the formatting mode to useMethod Detail |
---|
public void setMaxArgLength(int maxArgLength)
setMaxArgLength
in interface InterceptorToStringBuilder
maxArgLength
- The maxArgLength to set.InterceptorToStringBuilder.setMaxArgLength(int)
public void setTarget(java.lang.Object target)
setTarget
in interface InterceptorToStringBuilder
target
- The target to set.InterceptorToStringBuilder.setTarget(java.lang.Object)
public void setMode(int mode)
setMode
in interface InterceptorToStringBuilder
mode
- Set the formatting mode to useInterceptorToStringBuilder.setMode(int)
public int getMode()
public java.lang.String toString()
InterceptorToStringBuilder
toString
in interface InterceptorToStringBuilder
toString
in class java.lang.Object
Object.toString()
protected java.lang.String toString(java.lang.Throwable throwable)
throwable
- the Throwable
protected java.lang.String toString(java.lang.Object[] array)
array
- the array to print
protected java.lang.String toString(boolean[] array)
array
- the array to print
protected java.lang.String toString(char[] array)
array
- the array to print
protected java.lang.String toString(short[] array)
array
- the array to print
protected java.lang.String toString(int[] array)
array
- the array to print
protected java.lang.String toString(long[] array)
array
- the array to print
protected java.lang.String toString(float[] array)
array
- the array to print
protected java.lang.String toString(double[] array)
array
- the array to print
protected java.lang.String toString(java.lang.String string)
string
- the string to printprotected java.lang.String toString(byte[] array)
array
- the array to print
protected java.lang.String toString(java.util.Collection collection)
collection
- the collection to print
protected java.lang.String toString(java.util.Dictionary dictionary)
dictionary
- the collection to print
protected java.lang.String toString(java.lang.Object object)
object
- the object
protected void appendHashCode(java.lang.Object target)
target
- the object to printprotected void appendClassName(java.lang.Object target)
target
- the object to printprotected void appendChar(char ch)
ch
- the object to printprotected int getMaxArgLength()
protected java.lang.String getStackTrace(java.lang.Throwable throwable)
Gets the stack trace from a Throwable as a String.
throwable
- the Throwable
to be examined
printStackTrace(PrintWriter)
methodprotected void append(java.lang.String source)
source
- the string to appendprotected java.lang.String format(java.lang.String source)
source
- the source string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |