Class AbstractSingleItemHandler<T>
- java.lang.Object
-
- net.thucydides.core.annotations.locators.AbstractSingleItemHandler<T>
-
- Type Parameters:
T
- the target interface
- All Implemented Interfaces:
InvocationHandler
- Direct Known Subclasses:
SmartElementHandler
,SmartWidgetHandler
public abstract class AbstractSingleItemHandler<T> extends Object implements InvocationHandler
Base class for handlers of non-List members.- Author:
- Joe Nasca
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<?>
implementerClass
protected org.openqa.selenium.support.pagefactory.ElementLocator
locator
protected PageObject
page
-
Constructor Summary
Constructors Constructor Description AbstractSingleItemHandler(Class<T> targetInterface, Class<?> interfaceType, org.openqa.selenium.support.pagefactory.ElementLocator locator, PageObject page)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Object
invoke(Object object, Method method, Object[] objects)
protected abstract Object
newElementInstance()
-
-
-
Field Detail
-
locator
protected final org.openqa.selenium.support.pagefactory.ElementLocator locator
-
page
protected final PageObject page
-
implementerClass
protected final Class<?> implementerClass
-
-
Constructor Detail
-
AbstractSingleItemHandler
public AbstractSingleItemHandler(Class<T> targetInterface, Class<?> interfaceType, org.openqa.selenium.support.pagefactory.ElementLocator locator, PageObject page)
-
-
Method Detail
-
invoke
public Object invoke(Object object, Method method, Object[] objects) throws Throwable
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
newElementInstance
protected abstract Object newElementInstance() throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException
-
-