Skip to content

Instantly share code, notes, and snippets.

@iocanel
Created March 5, 2012 19:18
Show Gist options
  • Save iocanel/1980460 to your computer and use it in GitHub Desktop.
Save iocanel/1980460 to your computer and use it in GitHub Desktop.
ReflectionUtils example
Class someBeanClass = SomeBean.class;
Field privatePropertyField = ReflectionUtils.findField(someBeanClass, "privateProperty");
ReflectionUtils.makeAccessible(privatePropertyField);
String privatePropertyValue = ReflectionUtils.getField(privatePropertyField, someBeanInstance);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment