protected String toString()

in src/java/org/apache/fulcrum/yaafi/interceptor/util/ArgumentToStringBuilderImpl.java [755:794]


    protected String toString(Object object)
    {
        String result = null;
        String temp = null;
        String className = null;

        if( object == null )
        {
            result = NULL_STRING;
        }
        else
        {
            temp = object.toString();

            className = StringUtils.replace(
                object.getClass().getName(),
                "java.lang.", ""
                );

            if( temp.startsWith(className) == false )
            {
                int hashCode = object.hashCode();
                StringBuilder tempBuffer = new StringBuilder();
                tempBuffer.append(className);
                tempBuffer.append('@');
                tempBuffer.append(hashCode);
                tempBuffer.append('[');
                tempBuffer.append(temp);
                tempBuffer.append(']');

                result = tempBuffer.toString();
            }
            else
            {
                result = temp;
            }
        }

        return result;
    }