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 & childName accordingly.
Method Summary |
java.lang.String |
resolveChildRelationName(java.lang.String parentName,
java.lang.Object parent,
java.lang.String childName,
java.lang.Object child)
Follow the most conventional plural in English, add 's' to childName.
If the property does not exist then it will return childName
unchanged. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectGraphBuilder.DefaultRelationNameResolver
public ObjectGraphBuilder.DefaultRelationNameResolver()
resolveChildRelationName
public java.lang.String resolveChildRelationName(java.lang.String parentName,
java.lang.Object parent,
java.lang.String childName,
java.lang.Object child)
- Follow the most conventional plural in English, add 's' to childName.
If the property does not exist then it will return childName
unchanged.
- Specified by:
resolveChildRelationName
in interface ObjectGraphBuilder.RelationNameResolver
- Parameters:
parentName
- the name of the parent nodeparent
- the parent nodechildName
- the name of the child nodechild
- the child node
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:
resolveParentRelationName
in interface ObjectGraphBuilder.RelationNameResolver
- Parameters:
parentName
- the name of the parent nodeparent
- the parent nodechildName
- the name of the child nodechild
- the child node
Copyright © ${year} The Codehaus. All Rights Reserved.