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 DeclareFieldsTransformer #25

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jonesdevelopment
Copy link
Contributor

Declares fields that have constant values:

private static final int a = 1;
private static final int b = 2;
private static final int c = 3;

turns into

private static final int a;
private static final int b;
private static final int c;

static {
  a = 1;
  b = 2;
  c = 3;
}

This makes it possible to harden the obfuscation of constants (by allowing other transformers to access these values since they'd normally only be accessible through field.value).

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

Successfully merging this pull request may close these issues.

1 participant