Class ReflectionHelpers

java.lang.Object
io.appium.java_client.internal.ReflectionHelpers

public class ReflectionHelpers extends Object
  • Method Details

    • setPrivateFieldValue

      public static <T> T setPrivateFieldValue(Class<?> cls, T target, String fieldName, Object newValue)
      Sets the given value to a private instance field.
      Parameters:
      cls - The target class or a superclass.
      target - Target instance.
      fieldName - Target field name.
      newValue - The value to be set.
      Returns:
      The same instance for chaining.