Class FieldInitializationReport
java.lang.Object
org.mockito.internal.util.reflection.FieldInitializationReport
Report on field initialization
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Object
private final boolean
private final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionFieldInitializationReport
(Object fieldInstance, boolean wasInitialized, boolean wasInitializedUsingConstructorArgs) -
Method Summary
Modifier and TypeMethodDescriptionClass
<?> Returns the class of the actual instance in the field.Returns the actual field instance.boolean
Indicate whether the field was created during the process or not.boolean
Indicate whether the field was created using constructor args.
-
Field Details
-
fieldInstance
-
wasInitialized
private final boolean wasInitialized -
wasInitializedUsingConstructorArgs
private final boolean wasInitializedUsingConstructorArgs
-
-
Constructor Details
-
FieldInitializationReport
public FieldInitializationReport(Object fieldInstance, boolean wasInitialized, boolean wasInitializedUsingConstructorArgs)
-
-
Method Details
-
fieldInstance
Returns the actual field instance.- Returns:
- the actual instance
-
fieldWasInitialized
public boolean fieldWasInitialized()Indicate whether the field was created during the process or not.- Returns:
true
if created,false
if the field did already hold an instance.
-
fieldWasInitializedUsingContructorArgs
public boolean fieldWasInitializedUsingContructorArgs()Indicate whether the field was created using constructor args.- Returns:
true
if field was created using constructor parameters.
-
fieldClass
Returns the class of the actual instance in the field.- Returns:
- Class of the instance
-