As far as I understand, you can only set readOnly = false on a private field of a class when the Advice is inlined. The problem is that it cannot be inlined due to the IndyBootstrap.
How can we change private fields of classes with this approach? Or is this a limitation of the ElasticAPM intrumentation?
The advice method returns the value that should be assigned to the filed. The linked tests show two forms:
If you only want to assign to a field, your advice method will return the value to assign and you don't need to specify index
If you want to assign to multiple things, your advice method needs to return an Object[] and the index specifies what value from the returned array needs to be assigned to the corresponding field.
Yes, assuming that the localState field's type is Map<IOLocal<?>, Object> and this is also what is being returned from localState.updated("foo", "bar").
If it works, then it's probably right
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.