* specify which method should be used, if any, to set the parent to child node.
*/
public void associate(GroovyBuilder builder, ObjectFactoryInterceptor ofi, Object child, Object parent) {
Node.Type type = null;
boolean parentRequired = true;
Node cnode = child.getClass().getAnnotation(Node.class);
if (cnode != null) {
type = cnode.value();
parentRequired = cnode.parentRequired();
} else {
ClassMethod method = this.getTypeIndicator(child.getClass());
if (method != null) {
cnode = method.getAnnotation(Node.class);
parentRequired = cnode.parentRequired();
type = (Node.Type) method.invoke(child);
} else {
type = Node.Type.Branch;
parentRequired = false;
}