replace increment / decrement synthetic access method, pull-request #373

This commit is contained in:
Egor.Ushakov
2016-03-28 13:57:29 +03:00
parent 081a208a6a
commit 95215dc2e2
7 changed files with 169 additions and 9 deletions

View File

@@ -0,0 +1,44 @@
package pkg;
/**
* @author Alexandru-Constantin Bledea
* @since March 20, 2016
*/
class TestSyntheticAccess {
private static int s;
private int i;
private class Incrementer {
void orI() {
i|=1;
}
void incrementI() {
i++;
}
void decrementI() {
--i;
}
void incrementS() {
++s;
}
void decrementS() {
s--;
}
}
private class Assigner {
void assignI(int newValue) {
i = newValue;
}
void assignS(int newValue) {
s = newValue;
}
}
}