Revision: 23743
Updated Code
at February 12, 2010 02:05 by alun
Updated Code
def getFieldValue = { obj, fieldName -> def fields = obj.class.getDeclaredFields() Field field = fields.find { it.name == fieldName } field.setAccessible( true ) return field.get( obj ) }
Revision: 23742
Updated Code
at February 12, 2010 02:05 by alun
Updated Code
def getFieldValue = { obj, fieldName -> def fields = obj.class.getDeclaredFields() Field field = fields.find { it.name == fieldName } field.setAccessible( true ) return field.get( obj ) }
Revision: 23741
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 12, 2010 02:04 by alun
Initial Code
def getFieldValue = { obj, fieldName -> def fields = SLF4JLocationAwareLog.class.getDeclaredFields() Field field = fields.find { it.name == fieldName } field.setAccessible( true ) return field.get( obj ) }
Initial URL
Initial Description
Closure to help getting values of private fields
Initial Title
get private field value
Initial Tags
Initial Language
Groovy