New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail to read property due to IllegalArgumentException
when using it on withX methods
#1601
Comments
You can creste your own annotation and bind it to a Field as you want. Check the javadoc for further details. |
Hi,
|
So you want to access if a method changes a property? I was thinking that you derive that from the method name. |
I am deriving this from method name, I want to be able to do it by using @Advice.Origin("#p") only without adding code of my own. currently, the code is like so:
I also had to create seperate interceptors since |
Hi, I am using lombok in java and make immutable object using the With annotation.
tried to use byte-buddy Advice to recognize a change of property in a class , but since it is not a setter it throws an exception:
withStatus does not follow Java bean naming conventions
maybe java bean naming convention is too strict for this...
It will be great to be able to use
@Advice.Origin("#p") String propertyName
such that it will work with any method that contains the field name even if someone will call it updateX().if this bug/feat does not seem proper to you I will be glad for a reference for what I can do it otherwise. my goal is to track any field change, so the best way I saw doing it is by assuming this naming convention + checking that the value has changed by returning a value on
@Advice.OnMethodEnter
and checking the value on exist is different than the value on enter with@Advice.Enter Object value
.thanks!
full code usage:
The text was updated successfully, but these errors were encountered: