Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 Object
implements ObjectGraphBuilder.RelationNameResolver

Default impl that returns parentName & childName accordingly.

Constructor Summary
`ObjectGraphBuilder.DefaultRelationNameResolver()`

Method Summary
`String` | `resolveChildRelationName(String parentName, Object parent, String childName, Object child)` Follow the most conventional plural in English, add 's' to childName.
`String` | `resolveParentRelationName(String parentName, Object parent, String childName, 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`

Constructor Detail

### ObjectGraphBuilder.DefaultRelationNameResolver

    public ObjectGraphBuilder.DefaultRelationNameResolver()

Method Detail

### resolveChildRelationName

    public String resolveChildRelationName(String parentName,
                                           Object parent,
                                           String childName,
                                           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 node
    `parent` - the parent node
    `childName` - the name of the child node
    `child` - the child node

### resolveParentRelationName

    public String resolveParentRelationName(String parentName,
                                            Object parent,
                                            String childName,
                                            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 node
    `parent` - the parent node
    `childName` - the name of the child node
    `child` - the child node

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2003-2008 The Codehaus. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD