org.oddjob.arooa.standard
Class RootHandler

java.lang.Object
  extended by org.oddjob.arooa.standard.RootHandler
All Implemented Interfaces:
ArooaHandler

public class RootHandler
extends Object
implements ArooaHandler

The first handler to be called. This will receive an onStartElement with the document root as the element.

If the document tag is specified this will verify the name of the element root against the document tag.

The startHandler is provided as the handler for dealing with this document element. Thus the startHandler can then process the document element in it's onStartElement method as per the typical pattern of an ArooaHandler.

See Also:
ArooaHandler.
Author:
Rob Gordon.

Constructor Summary
RootHandler(ArooaElement documentTag, ElementAction<? extends org.oddjob.arooa.standard.InstanceRuntime> startHandler)
          Constructor.
RootHandler(ElementAction<? extends org.oddjob.arooa.standard.InstanceRuntime> startHandler)
          /** Constructor.
 
Method Summary
 ArooaContext onStartElement(ArooaElement element, ArooaContext parentContext)
          Handle the top level element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RootHandler

public RootHandler(ElementAction<? extends org.oddjob.arooa.standard.InstanceRuntime> startHandler)
/** Constructor.

Parameters:
handler - The handler to use for the top level element.

RootHandler

public RootHandler(ArooaElement documentTag,
                   ElementAction<? extends org.oddjob.arooa.standard.InstanceRuntime> startHandler)
Constructor.

Parameters:
documentTag - The document tag which will be validated against the top level element if not null.
handler - The handler to use for the top level element.
Method Detail

onStartElement

public ArooaContext onStartElement(ArooaElement element,
                                   ArooaContext parentContext)
                            throws ArooaConfigurationException
Handle the top level element.

Specified by:
onStartElement in interface ArooaHandler
Parameters:
element - The configuration element.
parentContext - The parent ArooaContext.
Returns:
A new ArooaContext for this element.
Throws:
ArooaConfigurationException