Class A {
String x;
}
I have 2 interfaces I1 and I2.
Class C1 implements I1
Class C2 implements I2
Is there any way to only allow Class C2 to update x of Class A? i.e. is there any way by which classes implementing a particular interface update the members of Class A?
Classes implementing I1 should only be able to read the members of class A and they should not be allowed to update the members of class A.