Class FieldInitializationReport
java.lang.Object
org.mockito.internal.util.reflection.FieldInitializationReport
Report on field initialization
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Objectprivate final booleanprivate 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.booleanIndicate whether the field was created during the process or not.booleanIndicate 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
-
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
Returns the class of the actual instance in the field.- Returns:
- Class of the instance
-