org.apache.commons.betwixt.io.read
Class BeanBindAction
java.lang.Object
|
+--org.apache.commons.betwixt.io.read.MappingAction
|
+--org.apache.commons.betwixt.io.read.MappingAction.Base
|
+--org.apache.commons.betwixt.io.read.BeanBindAction
- public class BeanBindAction
- extends MappingAction.Base
Action that creates and binds a new bean instance.
- Version:
- $Revision: 155402 $
- Author:
- Jakarta Commons Team
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final BeanBindAction INSTANCE
- Singleton instance
BeanBindAction
public BeanBindAction()
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
- Following copied from class:
org.apache.commons.betwixt.io.read.MappingAction
- Parameters:
namespace
- name
- attributes
- Attributes not nullcontext
- Context not null- Returns:
- the MappingAction to be used to map the sub-graph
under this element
- Throws:
java.lang.Exception
-
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
- Following copied from class:
org.apache.commons.betwixt.io.read.MappingAction
- Parameters:
text
- context
- - Throws:
java.lang.Exception
-
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
- Following copied from class:
org.apache.commons.betwixt.io.read.MappingAction
- Parameters:
context
- - Throws:
java.lang.Exception
-
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 elementname
- the local nameattributes
- the Attributes
used to match ID/IDREF
- Returns:
- the created bean
Copyright © 2002-2005 The Apache Software Foundation. All Rights Reserved.