Bypass Encapsulation

  1. Use Whitebox.setInternalState(..) to set a private member of an instance or class.
  2. Use Whitebox.getInternalState(..) to get a private member of an instance or class.
  3. Use Whitebox.invokeMethod(..) to invoke a private method of an instance or class.
  4. Use Whitebox.invokeConstructor(..) to create an instance of a class with a private constructor.

你可能感兴趣的:(CAP)