## groovy.util
Interface ObjectGraphBuilder

A builder for creating object graphs.
Each node defines the class to be created and the property on its parent (if any) at the same time.

author:
  Scott Vlaminck (http://refactr.com)

author:
  Andres Almiray <aalmiray@users.sourceforge.com>

Field Summary
`String` | `NODE_CLASS`
`String` | `NODE_NAME`
`String` | `OBJECT_ID`
`ChildPropertySetter` | `childPropertySetter`
`ClassLoader` | `classLoader`
`ClassNameResolver` | `classNameResolver`
`IdentifierResolver` | `identifierResolver`
`NewInstanceResolver` | `newInstanceResolver`
`ObjectFactory` | `objectFactory`
`ObjectRefFactory` | `objectRefFactory`
`ReferenceResolver` | `referenceResolver`
`RelationNameResolver` | `relationNameResolver`
`Map` | `resolvedClasses`

Constructor Summary
`ObjectGraphBuilder()`

Method Summary
`ChildPropertySetter` | `getChildPropertySetter()` Returns the current ChildPropertySetter.
`ClassLoader` | `getClassLoader()` Returns the classLoader used to load a node's class.
`ClassNameResolver` | `getClassNameResolver()` Returns the current ClassNameResolver.
`NewInstanceResolver` | `getNewInstanceResolver()` Returns the current NewInstanceResolver.
`RelationNameResolver` | `getRelationNameResolver()` Returns the current RelationNameResolver.
`void` | `postInstantiate(Object name, Map attributes, Object node)`
`void` | `preInstantiate(Object name, Map attributes, Object value)`
`String` | `resolveClassname(String classname)`
`Factory` | `resolveFactory(Object name, Map attributes, Object value)`
`void` | `setChild(Object parent, Object child, String parentName, String propertyName)`
`void` | `setChildPropertySetter(Object childPropertySetter)` Sets the current ChildPropertySetter.
`void` | `setClassLoader(ClassLoader classLoader)` Sets the classLoader used to load a node's class.
`void` | `setClassNameResolver(Object classNameResolver)` Sets the current ClassNameResolver.
`void` | `setIdentifierResolver(Object identifierResolver)` Sets the current IdentifierResolver.
`void` | `setNewInstanceResolver(Object newInstanceResolver)` Sets the current NewInstanceResolver.
`void` | `setReferenceResolver(Object referenceResolver)` Sets the current ReferenceResolver.
`void` | `setRelationNameResolver(RelationNameResolver relationNameResolver)` Sets the current RelationNameResolver.

Constructor Detail

### ObjectGraphBuilder

    public ObjectGraphBuilder()

Method Detail

### getChildPropertySetter

    public ChildPropertySetter getChildPropertySetter()

  Returns the current ChildPropertySetter.

### getClassLoader

    public ClassLoader getClassLoader()

  Returns the classLoader used to load a node's class.

### getClassNameResolver

    public ClassNameResolver getClassNameResolver()

  Returns the current ClassNameResolver.

### getNewInstanceResolver

    public NewInstanceResolver getNewInstanceResolver()

  Returns the current NewInstanceResolver.

### getRelationNameResolver

    public RelationNameResolver getRelationNameResolver()

  Returns the current RelationNameResolver.

### postInstantiate

    void postInstantiate(Object name, Map attributes, Object node)

### preInstantiate

    void preInstantiate(Object name, Map attributes, Object value)

### resolveClassname

    public String resolveClassname(String classname)

  param:
    classname the node name as written on the building code

### resolveFactory

    Factory resolveFactory(Object name, Map attributes, Object value)

### setChild

    public void setChild(Object parent, Object child, String parentName, String propertyName)

  param:
    parent the parent's node value
  param:
    child the child's node value
  param:
    parentName the name of the parent node
  param:
    propertyName the resolved relation name of the child

### setChildPropertySetter

    public void setChildPropertySetter(Object childPropertySetter)

  Sets the current ChildPropertySetter.
  It will assign DefaultChildPropertySetter if null.
  It accepts a ChildPropertySetter instance or a Closure.

### setClassLoader

    public void setClassLoader(ClassLoader classLoader)

  Sets the classLoader used to load a node's class.

### setClassNameResolver

    public void setClassNameResolver(Object classNameResolver)

  Sets the current ClassNameResolver.
  It will assign DefaultClassNameResolver if null.
  It accepts a ClassNameResolver instance, a String or a Closure.

### setIdentifierResolver

    public void setIdentifierResolver(Object identifierResolver)

  Sets the current IdentifierResolver.
  It will assign DefaultIdentifierResolver if null.
  It accepts a IdentifierResolver instance or a Closure.

### setNewInstanceResolver

    public void setNewInstanceResolver(Object newInstanceResolver)

  Sets the current NewInstanceResolver.
  It will assign DefaultNewInstanceResolver if null.
  It accepts a NewInstanceResolver instance or a Closure.

### setReferenceResolver

    public void setReferenceResolver(Object referenceResolver)

  Sets the current ReferenceResolver.
  It will assign DefaultReferenceResolver if null.
  It accepts a ReferenceResolver instance or a Closure.

### setRelationNameResolver

    public void setRelationNameResolver(RelationNameResolver relationNameResolver)

  Sets the current RelationNameResolver.
  It will assign DefaultRelationNameResolver if null.