org.apache.commons.betwixt.io.read
Class BeanBindAction

java.lang.Object
  extended by org.apache.commons.betwixt.io.read.MappingAction
      extended by org.apache.commons.betwixt.io.read.MappingAction.Base
          extended by org.apache.commons.betwixt.io.read.BeanBindAction

public class BeanBindAction
extends MappingAction.Base

Action that creates and binds a new bean instance.

Version:
$Revision: 561314 $
Author:
Apache Commons Team

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.betwixt.io.read.MappingAction
MappingAction.Base
 
Field Summary
static BeanBindAction INSTANCE
          Singleton instance
 
Fields inherited from class org.apache.commons.betwixt.io.read.MappingAction
EMPTY, IGNORE
 
Constructor Summary
BeanBindAction()
           
 
Method Summary
 MappingAction begin(java.lang.String namespace, java.lang.String name, org.xml.sax.Attributes attributes, ReadContext context)
          Begins a new element which is to be bound to a bean.
 void body(java.lang.String text, ReadContext context)
          Executes mapping action for element body text
protected  java.lang.Object createBean(java.lang.String namespace, java.lang.String name, org.xml.sax.Attributes attributes, ElementDescriptor descriptor, ReadContext context)
          Factory method to create new bean instances
 void end(ReadContext context)
          Executes mapping action one element ends
 
Methods inherited from class org.apache.commons.betwixt.io.read.MappingAction.Base
next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final BeanBindAction INSTANCE
Singleton instance

Constructor Detail

BeanBindAction

public BeanBindAction()
Method Detail

begin

public MappingAction begin(java.lang.String namespace,
                           java.lang.String name,
                           org.xml.sax.Attributes attributes,
                           ReadContext context)
                    throws java.lang.Exception
Begins a new element which is to be bound to a bean.

Overrides:
begin in class MappingAction.Base
attributes - Attributes not null
context - Context not null
Returns:
the MappingAction to be used to map the sub-graph under this element
Throws:
java.lang.Exception
See Also:
MappingAction.begin(String, String, Attributes, ReadContext)

body

public void body(java.lang.String text,
                 ReadContext context)
          throws java.lang.Exception
Description copied from class: MappingAction
Executes mapping action for element body text

Overrides:
body in class MappingAction.Base
Throws:
java.lang.Exception
See Also:
MappingAction.body(String, ReadContext)

end

public void end(ReadContext context)
         throws java.lang.Exception
Description copied from class: MappingAction
Executes mapping action one element ends

Overrides:
end in class MappingAction.Base
Throws:
java.lang.Exception
See Also:
MappingAction.end(ReadContext)

createBean

protected java.lang.Object createBean(java.lang.String namespace,
                                      java.lang.String name,
                                      org.xml.sax.Attributes attributes,
                                      ElementDescriptor descriptor,
                                      ReadContext context)
Factory method to create new bean instances

Parameters:
namespace - the namespace for the element
name - the local name
attributes - the Attributes used to match ID/IDREF
Returns:
the created bean


Copyright 2002-2008 The Apache Software Foundation. All Rights Reserved.