Package groovy.util
Class ObjectGraphBuilder.DefaultRelationNameResolver
- java.lang.Object
 - 
- groovy.util.ObjectGraphBuilder.DefaultRelationNameResolver
 
 
- 
- All Implemented Interfaces:
 ObjectGraphBuilder.RelationNameResolver
- Enclosing class:
 - ObjectGraphBuilder
 
public static class ObjectGraphBuilder.DefaultRelationNameResolver extends java.lang.Object implements ObjectGraphBuilder.RelationNameResolver
Default impl that returns parentName and childName accordingly. 
- 
- 
Constructor Summary
Constructors Constructor Description DefaultRelationNameResolver() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringresolveChildRelationName(java.lang.String parentName, java.lang.Object parent, java.lang.String childName, java.lang.Object child)Handles the common English regular plurals with the following rules.java.lang.StringresolveParentRelationName(java.lang.String parentName, java.lang.Object parent, java.lang.String childName, java.lang.Object child)Follow the most conventional pattern, returns the parentName unchanged. 
 - 
 
- 
- 
Method Detail
- 
resolveChildRelationName
public java.lang.String resolveChildRelationName(java.lang.String parentName, java.lang.Object parent, java.lang.String childName, java.lang.Object child)Handles the common English regular plurals with the following rules.- If childName ends in {consonant}y, replace 'y' with "ies". For example, allergy to allergies.
 - Otherwise, append 's'. For example, monkey to monkeys; employee to employees.
 
- Specified by:
 resolveChildRelationNamein interfaceObjectGraphBuilder.RelationNameResolver- Parameters:
 parentName- the name of the parent nodeparent- the parent nodechildName- the name of the child nodechild- the child node- See Also:
 - English_plural
 
 
- 
resolveParentRelationName
public java.lang.String resolveParentRelationName(java.lang.String parentName, java.lang.Object parent, java.lang.String childName, java.lang.Object child)Follow the most conventional pattern, returns the parentName unchanged.- Specified by:
 resolveParentRelationNamein interfaceObjectGraphBuilder.RelationNameResolver- Parameters:
 parentName- the name of the parent nodeparent- the parent nodechildName- the name of the child nodechild- the child node
 
 - 
 
 -