commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nodje <>
Subject [Lang] excluding Fields in ReflectionToStringBuilder
Date Fri, 05 Jun 2009 10:47:25 GMT


I'm using ReflectionToStringBuilder to build a default toString() for all my
Hibernate entities.
It creates problem with non initialized Fields when outside of an open

Basically, I'd like to be able to exclude all entity subobjects by putting
them in ExcludeFieldNames so that they don't get accessed.

I can't see any way to do that with the actual implementation. Do you think
it's possible at all with the actual 2.4 implementation? What about 2.5.

If not, I'll certainly have to implement my own ReflectionToStringBuilder
with the ability of exluding fields that are <? extends ModelObject>. I wish
I woudn't have to use 'instanceof' but I can't see any other way.

thanks for your help.
View this message in context:
Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message