Package org.awaitility.core
Class FieldSupplierBuilder
java.lang.Object
org.awaitility.core.FieldSupplierBuilder
The field supplier builder allows you to create a supplier based a field.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclassclass -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Class<? extends Annotation>private Stringprivate Class<?>private final Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassertNotNullParameter(Object parameterValue, String name) (package private) Class<? extends Annotation>(package private) String(package private) Class<?>(package private) ObjectFind a field based on a type.
-
Field Details
-
object
-
expectedFieldName
-
expectedFieldType
-
expectedAnnotation
-
-
Constructor Details
-
FieldSupplierBuilder
Constructor for FieldSupplierBuilder.
- Parameters:
object- aObjectobject.
-
-
Method Details
-
ofType
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));
orawait().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
-
assertNotNullParameter
-
getObject
Object getObject() -
getExpectedFieldName
String getExpectedFieldName() -
getExpectedFieldType
Class<?> getExpectedFieldType() -
getExpectedAnnotation
Class<? extends Annotation> getExpectedAnnotation()
-