private static int calculateDepth(final DiffNode node) { int count = 0; DiffNode parentNode = node.getParentNode(); while (parentNode != null) { count++; parentNode = parentNode.getParentNode(); } return count; }
private boolean hasIncludedSiblings(final DiffNode node) { for (final Map.Entry<PropertyId, Inclusion> entry : inclusions.entrySet()) { if (entry.getKey().type == node.getParentNode().getValueType() && entry.getValue() == INCLUDED) { return true; } } return false; }
private static boolean isQualified(final DiffNode node) { if (node.isPropertyAware()) { if (node.getParentNode() == null || node.getParentNode().getValueType() == null) { return false; } if (node.getPropertyName() == null) { return false; } return true; } return false; }
private static Iterable<PropertyAwareAccessor> getSiblingAccessors(final DiffNode node) { final DiffNode parentNode = node.getParentNode(); if (parentNode != null) { final TypeInfo typeInfo = parentNode.getValueTypeInfo(); if (typeInfo != null) { return typeInfo.getAccessors(); } } return emptyList(); } }
private static boolean isQualified(final DiffNode node) { if (node.isPropertyAware()) { if (node.getParentNode() == null || node.getParentNode().getValueType() == null) { return false; } if (node.getPropertyName() == null) { return false; } return true; } return false; }
private static DiffNode findNodeMatchingPropertyPath(final DiffNode node, final NodePath nodePath) { if (node == null) { return null; } if (node.matches(nodePath)) { return node; } return findNodeMatchingPropertyPath(node.getParentNode(), nodePath); }
"This is not allowed and must be a mistake."); else if (node.getParentNode() != null && node.getParentNode() != this) "cause infinite loops."); if (node.getParentNode() == null)
public Inclusion getInclusion(final DiffNode node) { if (node != null && !isInactive()) { final Inclusion inclusion = propertyNameInclusions.get(node.getPropertyName()); if (inclusion == INCLUDED || inclusion == EXCLUDED) { return inclusion; } final Inclusion parentNodeInclusion = getInclusion(node.getParentNode()); if (parentNodeInclusion == INCLUDED) { return INCLUDED; } } return DEFAULT; }
public IdentityStrategy resolve(final DiffNode node) { if (isQualified(node)) { final PropertyId propertyKey = new PropertyId(node.getParentNode().getValueType(), node.getPropertyName()); return strategies.get(propertyKey); } return null; }
public Inclusion getInclusion(final DiffNode node) { if (isQualified(node)) { final PropertyId propertyKey = new PropertyId(node.getParentNode().getValueType(), node.getPropertyName()); final Inclusion inclusion = inclusions.get(propertyKey); if (inclusion != null && inclusion != DEFAULT) { return inclusion; } else { if (hasIncludedSiblings(node)) { return EXCLUDED; } } } return DEFAULT; }
private static int calculateDepth(final DiffNode node) { int count = 0; DiffNode parentNode = node.getParentNode(); while (parentNode != null) { count++; parentNode = parentNode.getParentNode(); } return count; }
private boolean hasIncludedSiblings(final DiffNode node) { for (final Map.Entry<PropertyId, Inclusion> entry : inclusions.entrySet()) { if (entry.getKey().type == node.getParentNode().getValueType() && entry.getValue() == INCLUDED) { return true; } } return false; }
private static boolean isQualified(final DiffNode node) { if (node.isPropertyAware()) { if (node.getParentNode() == null || node.getParentNode().getValueType() == null) { return false; } if (node.getPropertyName() == null) { return false; } return true; } return false; }
private static boolean isQualified(final DiffNode node) { if (node.isPropertyAware()) { if (node.getParentNode() == null || node.getParentNode().getValueType() == null) { return false; } if (node.getPropertyName() == null) { return false; } return true; } return false; }
private static Iterable<PropertyAwareAccessor> getSiblingAccessors(final DiffNode node) { final DiffNode parentNode = node.getParentNode(); if (parentNode != null) { final TypeInfo typeInfo = parentNode.getValueTypeInfo(); if (typeInfo != null) { return typeInfo.getAccessors(); } } return emptyList(); } }
private static DiffNode findNodeMatchingPropertyPath(final DiffNode node, final NodePath nodePath) { if (node == null) { return null; } if (node.matches(nodePath)) { return node; } return findNodeMatchingPropertyPath(node.getParentNode(), nodePath); }
"This is not allowed and must be a mistake."); else if (node.getParentNode() != null && node.getParentNode() != this) "cause infinite loops."); if (node.getParentNode() == null)
public Inclusion getInclusion(final DiffNode node) { if (node != null && !isInactive()) { final Inclusion inclusion = propertyNameInclusions.get(node.getPropertyName()); if (inclusion == INCLUDED || inclusion == EXCLUDED) { return inclusion; } final Inclusion parentNodeInclusion = getInclusion(node.getParentNode()); if (parentNodeInclusion == INCLUDED) { return INCLUDED; } } return DEFAULT; }
public IdentityStrategy resolve(final DiffNode node) { if (isQualified(node)) { final PropertyId propertyKey = new PropertyId(node.getParentNode().getValueType(), node.getPropertyName()); return strategies.get(propertyKey); } return null; }
public Inclusion getInclusion(final DiffNode node) { if (isQualified(node)) { final PropertyId propertyKey = new PropertyId(node.getParentNode().getValueType(), node.getPropertyName()); final Inclusion inclusion = inclusions.get(propertyKey); if (inclusion != null && inclusion != DEFAULT) { return inclusion; } else { if (hasIncludedSiblings(node)) { return EXCLUDED; } } } return DEFAULT; }