Skip to content
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

Implement changesOnly(targetField or getter) #14

Open
BenRomberg opened this issue May 14, 2012 · 1 comment
Open

Implement changesOnly(targetField or getter) #14

BenRomberg opened this issue May 14, 2012 · 1 comment
Milestone

Comments

@BenRomberg
Copy link
Member

changesOnly prevents modifications on all fields of a class except for those specified.

@BenRomberg
Copy link
Member Author

How to implement:

boolean changesOnly(T fieldOrGetter);

  1. analyse stack, require last call being invoke* or getfield
  2. for getfield, make sure it's a non-static field of the target class, set all other fields on unchangeable
  3. for invoke*, make sure it's a non-static method of the target class returning a value, instrument assuming the last getfield is the one we want

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant