Recently I have got a need to peek at some class field value. The class looks somewhat like this:
public class Foo(){
@Autowired
protected MessageResolver resolver;
protected static final String INJECTED_TEXT_PROPERTY_CODE = "code";
protected String injectedText;
@PostConstruct
public void initialize() {
injectedText = resolver.resolveMessage(INJECTED_TEXT_PROPERTY_CODE);
}
}
Then I have some property source like this:
code=injectedCode
Now the difficulty of the task is that it won't be on my machine but on the client machine. Therefore ideally I need some easy command to execute which will not mess with a working system.
EDIT: The field which I want to peak is injectedText.
EDIT2: Most interesting solution was introduced by @apangin (jmap and dump analyzis offline). Thanks!