Top Description Fields Constructors Methods
org.testng.internal

public final Class TestMethodContainer

extends Object
implements IContainer<ITestNGMethod>
Class Inheritance
All Implemented Interfaces
org.testng.internal.IContainer
Imports
java.util.Arrays, java.util.function.Supplier, org.testng.ITestNGMethod

This implementation leverages a supplier to lazily load the test methods (data) for the very first time and "remembers it" for later invocations. If the user clears the data (the one that we were remembering) then, it resorts to just using the supplier to provide on-demand evaluation of test methods. This implementation is built such that once its been asked to forget the data, it no longer caches it anymore.

Field Summary

Modifier and TypeField and Description
private boolean
private ITestNGMethod[]
private final Supplier<ITestNGMethod[]>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
clearItems()

Implements org.testng.internal.IContainer.clearItems.

Clears the container
public ITestNGMethod[]
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isClearedback to summary
private boolean isCleared
methodsback to summary
private ITestNGMethod[] methods
supplierback to summary
private final Supplier<ITestNGMethod[]> supplier

Constructor Detail

TestMethodContainerback to summary
public TestMethodContainer(Supplier<ITestNGMethod[]> supplier)

Method Detail

clearItemsback to summary
public void clearItems()

Implements org.testng.internal.IContainer.clearItems.

Doc from org.testng.internal.IContainer.clearItems.

Clears the container

getItemsback to summary
public ITestNGMethod[] getItems()

Implements org.testng.internal.IContainer.getItems.

Returns:ITestNGMethod[]

Doc from org.testng.internal.IContainer.getItems.

- Retrieves data from the container

isClearedback to summary
public boolean isCleared()

Implements org.testng.internal.IContainer.isCleared.

Returns:boolean

Doc from org.testng.internal.IContainer.isCleared.

- true if the container items were cleared.

Annotations
@Override