get private field value
Closure to help getting values of private fields
Copy this code and paste it in your HTML
def getFieldValue
= { obj, fieldName
-> def fields
= obj.
class.
getDeclaredFields() Field field
= fields.
find { it.
name == fieldName
} field.
setAccessible( true )}
Report this snippet
Comments
Subscribe to comments