@PublicApi public final class PageObjects extends Object
PageBinder and other page-object-related APIs.| Modifier and Type | Method and Description |
|---|---|
static <E,EE> Iterable<EE> |
bind(PageBinder binder,
Iterable<E> pageElements,
Class<EE> pageObjectClass,
Object... extraArguments)
Transforms a list of objects into a list of page objects wrapping those objects.
|
static <E,PO> com.google.common.base.Function<E,PO> |
bindTo(PageBinder binder,
Class<E> inputType,
Class<PO> pageObjectClass,
Object... extraArguments)
Binds 'wrapper' page objects that take one constructor parameter (and optionally any number of "fixed"
extraArguments. |
static <E,PO> com.google.common.base.Function<E,PO> |
bindTo(PageBinder binder,
Class<PO> pageObjectClass,
Object... extraArguments)
Version of
bindTo(PageBinder, Class, Class, Object...) for where there's no explicit input type. |
@Nonnull public static <E,PO> com.google.common.base.Function<E,PO> bindTo(@Nonnull PageBinder binder, @Nonnull Class<PO> pageObjectClass, @Nonnull Object... extraArguments)
bindTo(PageBinder, Class, Class, Object...) for where there's no explicit input type.E - input typePO - wrapping object typebinder - page binderpageObjectClass - target page object classextraArguments - extra arguments to use when binding each page objectbindTo(PageBinder, Class, Object...)@Nonnull public static <E,PO> com.google.common.base.Function<E,PO> bindTo(@Nonnull PageBinder binder, @Nullable Class<E> inputType, @Nonnull Class<PO> pageObjectClass, @Nonnull Object... extraArguments)
extraArguments. Most useful for simple page objects wrapping page elements, e.g. table rows.
Note: the wrapping type needs to have a constructor that accepts a single instance of the input type and all
the extra parameters as provided by extraArguments.E - input typePO - wrapping object typebinder - page binderinputType - source class to use this method more convenientlypageObjectClass - target page object classextraArguments - extra arguments to use when binding each page objectPageBinder.bind(Class, Object...)@Nonnull public static <E,EE> Iterable<EE> bind(@Nonnull PageBinder binder, @Nonnull Iterable<E> pageElements, @Nonnull Class<EE> pageObjectClass, @Nonnull Object... extraArguments)
E - input object typeEE - wrapping object typebinder - page binderpageElements - a list of page elements to transformpageObjectClass - target page object classextraArguments - extra arguments to use when binding each page objectbindTo(PageBinder, Class, Object...)Copyright © 2015 Atlassian. All rights reserved.