Klasse ArgumentToStringBuilderImpl

java.lang.Object
org.apache.fulcrum.yaafi.interceptor.util.ArgumentToStringBuilderImpl
Alle implementierten Schnittstellen:
InterceptorToStringBuilder

public class ArgumentToStringBuilderImpl extends Object implements InterceptorToStringBuilder
Creates a string representation of method argument.
Autor:
Siegfried Goeschl
  • Felddetails

    • INCLUDE_CLASSNAME

      public static final int INCLUDE_CLASSNAME
      include the class name in the result
      Siehe auch:
    • INCLUDE_HASHCODE

      public static final int INCLUDE_HASHCODE
      include the hashcode in the result
      Siehe auch:
  • Konstruktordetails

    • ArgumentToStringBuilderImpl

      public ArgumentToStringBuilderImpl()
      Constructor
    • ArgumentToStringBuilderImpl

      public ArgumentToStringBuilderImpl(Object target)
      Constructor
      Parameter:
      target - the object to print
    • ArgumentToStringBuilderImpl

      public ArgumentToStringBuilderImpl(Object target, int maxArgLength)
      Constructor
      Parameter:
      target - the object to print
      maxArgLength - the maximum length
    • ArgumentToStringBuilderImpl

      public ArgumentToStringBuilderImpl(Object target, int maxArgLength, int mode)
      Constructor
      Parameter:
      target - the object to print
      maxArgLength - the maximum length
      mode - the formatting mode to use
  • Methodendetails

    • setMaxArgLength

      public void setMaxArgLength(int maxArgLength)
      Angegeben von:
      setMaxArgLength in Schnittstelle InterceptorToStringBuilder
      Parameter:
      maxArgLength - The maxArgLength to set.
      Siehe auch:
    • setTarget

      public void setTarget(Object target)
      Angegeben von:
      setTarget in Schnittstelle InterceptorToStringBuilder
      Parameter:
      target - The target to set.
      Siehe auch:
    • setMode

      public void setMode(int mode)
      Angegeben von:
      setMode in Schnittstelle InterceptorToStringBuilder
      Parameter:
      mode - Set the formatting mode to use
      Siehe auch:
    • getMode

      public int getMode()
      Gibt zurück:
      Returns the mode.
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
      Siehe auch:
    • toString

      protected String toString(Throwable throwable)
      Create a String representation for a Throwable.
      Parameter:
      throwable - the Throwable
      Gibt zurück:
      the string representation
    • toString

      protected String toString(Object[] array)
      Create a string representation of an object array.
      Parameter:
      array - the array to print
      Gibt zurück:
      the result
    • toString

      protected String toString(boolean[] array)
      Create a string representation of a boolean[].
      Parameter:
      array - the array to print
      Gibt zurück:
      the result
    • toString

      protected String toString(char[] array)
      Create a string representation of a char[].
      Parameter:
      array - the array to print
      Gibt zurück:
      the result
    • toString

      protected String toString(short[] array)
      Create a string representation of a short[].
      Parameter:
      array - the array to print
      Gibt zurück:
      the result
    • toString

      protected String toString(int[] array)
      Create a string representation of a int[].
      Parameter:
      array - the array to print
      Gibt zurück:
      the result
    • toString

      protected String toString(long[] array)
      Create a string representation of a char[].
      Parameter:
      array - the array to print
      Gibt zurück:
      the result
    • toString

      protected String toString(float[] array)
      Create a string representation of a float[].
      Parameter:
      array - the array to print
      Gibt zurück:
      the result
    • toString

      protected String toString(double[] array)
      Create a string representation of a double[].
      Parameter:
      array - the array to print
      Gibt zurück:
      the result
    • toString

      protected String toString(String string)
      Create a string representation of a String.
      Parameter:
      string - the string to print
      Gibt zurück:
      the result
    • toString

      protected String toString(byte[] array)
      Create a string representation of a char[].
      Parameter:
      array - the array to print
      Gibt zurück:
      the result
    • toString

      protected String toString(Collection<?> collection)
      Create a string representation of a java.util.Collection.
      Parameter:
      collection - the collection to print
      Gibt zurück:
      the result
    • toString

      protected String toString(Dictionary<?,?> dictionary)
      Create a string representation of a Dictionary.
      Parameter:
      dictionary - the collection to print
      Gibt zurück:
      the result
    • toString

      protected String toString(Object object)
      Create a String representation for an arbitrary object.
      Parameter:
      object - the object
      Gibt zurück:
      string representation
    • appendHashCode

      protected void appendHashCode(Object target)
      Append the hash code.
      Parameter:
      target - the object to print
    • appendClassName

      protected void appendClassName(Object target)
      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

      protected String getStackTrace(Throwable throwable)

      Gets the stack trace from a Throwable as a String.

      Parameter:
      throwable - the Throwable to be examined
      Gibt zurück:
      the stack trace as generated by the exception's printStackTrace(PrintWriter) method
    • append

      protected void append(String source)
      Append a string to the internal buffer
      Parameter:
      source - the string to append
    • format

      protected String format(String source)
      Format the buffer by replacing the whitespaces and cutting away excessive fluff.
      Parameter:
      source - the source string
      Gibt zurück:
      formatted string