Class InterceptorOfASingleElement
- java.lang.Object
-
- io.appium.java_client.pagefactory.interceptors.InterceptorOfASingleElement
-
- All Implemented Interfaces:
MethodCallListener
- Direct Known Subclasses:
ElementInterceptor
,WidgetInterceptor
public abstract class InterceptorOfASingleElement extends java.lang.Object implements MethodCallListener
-
-
Field Summary
Fields Modifier and Type Field Description protected org.openqa.selenium.support.pagefactory.ElementLocator
locator
-
Constructor Summary
Constructors Constructor Description InterceptorOfASingleElement(org.openqa.selenium.support.pagefactory.ElementLocator locator, java.lang.ref.WeakReference<org.openqa.selenium.WebDriver> driverReference)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Object
call(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] args, java.util.concurrent.Callable<?> original)
Override this callback in order to change/customize the behavior of a single or multiple methods.protected abstract java.lang.Object
getObject(org.openqa.selenium.WebElement element, java.lang.reflect.Method method, java.lang.Object[] args)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.appium.java_client.proxy.MethodCallListener
afterCall, beforeCall, onError
-
-
-
-
Method Detail
-
getObject
protected abstract java.lang.Object getObject(org.openqa.selenium.WebElement element, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
call
public java.lang.Object call(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] args, java.util.concurrent.Callable<?> original) throws java.lang.Throwable
Description copied from interface:MethodCallListener
Override this callback in order to change/customize the behavior of a single or multiple methods. The original method result will be replaced with the result returned by this callback. Also, any exception thrown by it will replace original method(s) exception.- Specified by:
call
in interfaceMethodCallListener
- Parameters:
obj
- The proxy instancemethod
- Method to be replacedargs
- Array of method argumentsoriginal
- The reference to the original method in case it is necessary to instrument its result.- Returns:
- The type of the returned result should be castable to the returned type of the original method.
- Throws:
java.lang.Throwable
-
-