|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.pageobjects.binder.InjectPageBinder
@NotThreadSafe @Internal public final class InjectPageBinder
Page navigator that builds page objects from classes, then injects them with dependencies and calls lifecycle methods.
The construction process is as follows:
navigateToAndBind(Class, Object...))Inject, including privatePostInjectionProcessorWaitUntilValidateStateInitWhen going to a page via the navigateToAndBind(Class, Object...) method, the page's URL is retrieved and navigated to
via Tester.gotoUrl(String) after construction and initializing but before WaitUntil methods are called.
ConfigurableInjectionContext,
where injection configuration changes are applied in-place, by creating a new Guice injector.
| Constructor Summary | |
|---|---|
InjectPageBinder(ProductInstance productInstance,
Tester tester,
com.google.inject.Module... modules)
|
|
| Method Summary | ||
|---|---|---|
|
bind(Class<P> pageClass,
Object... args)
Builds and binds the page object to the page. |
|
InjectionConfiguration |
configure()
Get an injection configuration object that may be used to add/override objects in this injection context. |
|
|
delayedBind(Class<P> pageClass,
Object... args)
Creates a delayed binder that gives the caller full control over the lifecycle of the page object. |
|
|
getInstance(Class<T> type)
Get an instance of given type from context. |
|
void |
injectMembers(Object targetInstance)
Execute injection of fields on given targetInstance |
|
com.google.inject.Injector |
injector()
Deprecated. take advantage of InjectionContext API instead. Scheduled for removal in 3.0 |
|
void |
injectStatic(Class<?> targetClass)
Execute injection of static fields on given targetClass. |
|
|
navigateToAndBind(Class<P> pageClass,
Object... args)
Constructs the page object, changes the browser URL to the desired page URL, then binds the object to the page. |
|
|
override(Class<P> oldClass,
Class<? extends P> newClass)
Overrides a page object |
|
protected void |
visitUrl(Page p)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InjectPageBinder(ProductInstance productInstance,
Tester tester,
com.google.inject.Module... modules)
| Method Detail |
|---|
public com.google.inject.Injector injector()
InjectionContext API instead. Scheduled for removal in 3.0
public <P extends Page> P navigateToAndBind(Class<P> pageClass,
Object... args)
PageBinder
navigateToAndBind in interface PageBinderP - The page typepageClass - The page classargs - Arguments to pass to the page object constructor.
public <P> P bind(Class<P> pageClass,
Object... args)
PageBinder
bind in interface PageBinderP - The page typepageClass - The page object classargs - Arguments to pass to the page object constructor.
public <P> DelayedBinder<P> delayedBind(Class<P> pageClass,
Object... args)
PageBinderDelayedBinder methods are called.
delayedBind in interface PageBinderP - The page typepageClass - The page object classargs - The arguments to pass to the page object constructor
protected void visitUrl(Page p)
public <P> void override(Class<P> oldClass,
Class<? extends P> newClass)
PageBinder
override in interface PageBinderP - The old class typeoldClass - The old class that would have normally been constructednewClass - An subclass of the old class to be substituted
@Nonnull
public <T> T getInstance(@Nonnull
Class<T> type)
InjectionContext
getInstance in interface InjectionContextT - type paramtype - type of the requested instance
public void injectStatic(@Nonnull
Class<?> targetClass)
InjectionContext
injectStatic in interface InjectionContexttargetClass - class to inject into
public void injectMembers(@Nonnull
Object targetInstance)
InjectionContext
injectMembers in interface InjectionContexttargetInstance - instance to inject into@Nonnull public InjectionConfiguration configure()
ConfigurableInjectionContext
configure in interface ConfigurableInjectionContextInjectionConfiguration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||