Class FieldInitializationReport
- java.lang.Object
-
- org.mockito.internal.util.reflection.FieldInitializationReport
-
public class FieldInitializationReport extends java.lang.ObjectReport on field initialization
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ObjectfieldInstanceprivate booleanwasInitializedprivate booleanwasInitializedUsingConstructorArgs
-
Constructor Summary
Constructors Constructor Description FieldInitializationReport(java.lang.Object fieldInstance, boolean wasInitialized, boolean wasInitializedUsingConstructorArgs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>fieldClass()Returns the class of the actual instance in the field.java.lang.ObjectfieldInstance()Returns the actual field instance.booleanfieldWasInitialized()Indicate whether the field was created during the process or not.booleanfieldWasInitializedUsingContructorArgs()Indicate whether the field was created using constructor args.
-
-
-
Method Detail
-
fieldInstance
public java.lang.Object 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:
trueif created,falseif the field did already hold an instance.
-
fieldWasInitializedUsingContructorArgs
public boolean fieldWasInitializedUsingContructorArgs()
Indicate whether the field was created using constructor args.- Returns:
trueif field was created using constructor parameters.
-
fieldClass
public java.lang.Class<?> fieldClass()
Returns the class of the actual instance in the field.- Returns:
- Class of the instance
-
-