Class DefaultRecursiveAssertionIntrospectionStrategy
- java.lang.Object
-
- org.assertj.core.api.recursive.assertion.DefaultRecursiveAssertionIntrospectionStrategy
-
- All Implemented Interfaces:
RecursiveAssertionIntrospectionStrategy
public class DefaultRecursiveAssertionIntrospectionStrategy extends java.lang.Object implements RecursiveAssertionIntrospectionStrategy
-
-
Constructor Summary
Constructors Constructor Description DefaultRecursiveAssertionIntrospectionStrategy()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<RecursiveAssertionNode>
getChildNodesOf(java.lang.Object node)
Returns the child nodes of the given object that will be asserted in the recursive assertion.java.lang.String
getDescription()
Returns a human-readable description of the strategy to be used in error messages.private static java.lang.Class<?>
getFieldType(java.lang.Object fieldValue, java.lang.String fieldName, java.lang.Object targetObject)
private static java.lang.Class<?>
getFieldType(java.lang.String fieldName, java.lang.Class<?> objectClass)
private static RecursiveAssertionNode
toNode(java.lang.reflect.Field field, java.lang.Object node)
-
-
-
Method Detail
-
getChildNodesOf
public java.util.List<RecursiveAssertionNode> getChildNodesOf(java.lang.Object node)
Description copied from interface:RecursiveAssertionIntrospectionStrategy
Returns the child nodes of the given object that will be asserted in the recursive assertion.A typical implementation could look at the object fields or properties.
- Specified by:
getChildNodesOf
in interfaceRecursiveAssertionIntrospectionStrategy
- Parameters:
node
- the object to get the child from- Returns:
- the child nodes of the given object
-
getDescription
public java.lang.String getDescription()
Description copied from interface:RecursiveAssertionIntrospectionStrategy
Returns a human-readable description of the strategy to be used in error messages.Default implementation returns
this.getClass().getSimpleName()
.- Specified by:
getDescription
in interfaceRecursiveAssertionIntrospectionStrategy
- Returns:
- a description of the strategy
-
toNode
private static RecursiveAssertionNode toNode(java.lang.reflect.Field field, java.lang.Object node)
-
getFieldType
private static java.lang.Class<?> getFieldType(java.lang.Object fieldValue, java.lang.String fieldName, java.lang.Object targetObject)
-
getFieldType
private static java.lang.Class<?> getFieldType(java.lang.String fieldName, java.lang.Class<?> objectClass)
-
-