com.jayway.awaitility.core
Class FieldSupplierBuilder
java.lang.Object
com.jayway.awaitility.core.FieldSupplierBuilder
public class FieldSupplierBuilder
- extends Object
The field supplier builder allows you to create a supplier based a field.
Method Summary |
|
ofType(Class<T> fieldType)
Find a field based on a type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FieldSupplierBuilder
public FieldSupplierBuilder(Object object)
ofType
public <T> FieldSupplierBuilder.NameAndAnnotationFieldSupplier<T> ofType(Class<T> fieldType)
- Find a field based on a type. E.g.
await().until(fieldIn(object).ofType(int.class), equalTo(2));
You can also specify the field more accurately by continuing the statement:
E.g.
await().until(fieldIn(object).ofType(int.class).andWithName("fieldName"), equalTo(2));
or
await().until(fieldIn(object).ofType(int.class).andAnnotatedWith(MyAnnotation.class).andWithName("fieldName"), equalTo(2));
- Type Parameters:
T
- The type of the field- Parameters:
fieldType
- The type of the field.
- Returns:
- The field supplier
Copyright © 2010-2012. All Rights Reserved.