net.sf.oness.common.model.bo
Class ExceptionSafeReflectionToStringBuilder

java.lang.Object
  extended byorg.apache.commons.lang.builder.ToStringBuilder
      extended byorg.apache.commons.lang.builder.ReflectionToStringBuilder
          extended bynet.sf.oness.common.all.ReflectionToStringBuilder
              extended bynet.sf.oness.common.model.bo.ExceptionSafeReflectionToStringBuilder

public class ExceptionSafeReflectionToStringBuilder
extends net.sf.oness.common.all.ReflectionToStringBuilder

Customized ReflectionToStringBuilder ignoring fields that can't be accessed

Version:
$Revision: 1.1 $
Author:
Carlos Sanchez
See Also:
ReflectionToStringBuilder

Constructor Summary
ExceptionSafeReflectionToStringBuilder(java.lang.Object object)
           
 
Method Summary
protected  boolean accept(java.lang.reflect.Field field)
          Check if the field is a collection and try to fetch the size.
 
Methods inherited from class net.sf.oness.common.all.ReflectionToStringBuilder
getValue
 
Methods inherited from class org.apache.commons.lang.builder.ReflectionToStringBuilder
appendFieldsIn, getUpToClass, isAppendTransients, reflectionAppendArray, setAppendTransients, setUpToClass, toString, toString, toString, toString, toString
 
Methods inherited from class org.apache.commons.lang.builder.ToStringBuilder
append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, appendAsObjectToString, appendSuper, appendToString, getDefaultStyle, getObject, getStringBuffer, getStyle, reflectionToString, reflectionToString, reflectionToString, reflectionToString, setDefaultStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExceptionSafeReflectionToStringBuilder

public ExceptionSafeReflectionToStringBuilder(java.lang.Object object)
Method Detail

accept

protected boolean accept(java.lang.reflect.Field field)
Check if the field is a collection and try to fetch the size. If there is an error (as it happens with lazy initialized collections) the field is not accepted.

See Also:
ReflectionToStringBuilder.accept(java.lang.reflect.Field)


Copyright © 2003-2005 ONess Project. All Rights Reserved.