2016/05/28 - Apache Tuscany has been retired.

For more information, please explore the Attic.



org.apache.tuscany.sca.databinding.axiom
Class OMElementWrapperHandler

java.lang.Object
  extended by org.apache.tuscany.sca.databinding.axiom.OMElementWrapperHandler
All Implemented Interfaces:
WrapperHandler<OMElement>

public class OMElementWrapperHandler
extends java.lang.Object
implements WrapperHandler<OMElement>

OMElement wrapper handler implementation


Constructor Summary
OMElementWrapperHandler()
           
 
Method Summary
 OMElement create(Operation operation, boolean input)
          Create a wrapper element
 java.lang.Object getChild(OMElement wrapper, ElementInfo childElement, int index)
           
 java.util.List getChildren(OMElement wrapper, Operation operation, boolean input)
          Get a list of child elements from the wrapper
 DataType getWrapperType(Operation operation, boolean input)
          Get the data type for the wrapper
 boolean isInstance(java.lang.Object wrapperObj, Operation operation, boolean input)
          Check if the given data is an instance of the wrapper
 void setChild(OMElement wrapper, int i, ElementInfo childElement, java.lang.Object value)
           
 void setChildren(OMElement wrapper, java.lang.Object[] childObjects, Operation operation, boolean input)
          Populate the wrapper element with the child objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OMElementWrapperHandler

public OMElementWrapperHandler()
Method Detail

create

public OMElement create(Operation operation,
                        boolean input)
Description copied from interface: WrapperHandler
Create a wrapper element

Specified by:
create in interface WrapperHandler<OMElement>
Parameters:
operation - The operation
input - Is it for input or output
Returns:
An object representing the wrapper element

setChildren

public void setChildren(OMElement wrapper,
                        java.lang.Object[] childObjects,
                        Operation operation,
                        boolean input)
Description copied from interface: WrapperHandler
Populate the wrapper element with the child objects

Specified by:
setChildren in interface WrapperHandler<OMElement>
Parameters:
wrapper - The wrapper object
childObjects - The child objects
operation - The operation
input - Is it for input or output

setChild

public void setChild(OMElement wrapper,
                     int i,
                     ElementInfo childElement,
                     java.lang.Object value)

getChildren

public java.util.List getChildren(OMElement wrapper,
                                  Operation operation,
                                  boolean input)
Description copied from interface: WrapperHandler
Get a list of child elements from the wrapper

Specified by:
getChildren in interface WrapperHandler<OMElement>
Parameters:
wrapper - The wrapper object
operation - The operation
input - Is it for input or output
Returns:
child elements under the wrapper

getWrapperType

public DataType getWrapperType(Operation operation,
                               boolean input)
Description copied from interface: WrapperHandler
Get the data type for the wrapper

Specified by:
getWrapperType in interface WrapperHandler<OMElement>
Parameters:
operation - The operation
input - Is it for input or output?
Returns:
The data type of the wrapper, null if it's not a wrapper type
See Also:
WrapperHandler.getWrapperType(Operation, boolean)

isInstance

public boolean isInstance(java.lang.Object wrapperObj,
                          Operation operation,
                          boolean input)
Description copied from interface: WrapperHandler
Check if the given data is an instance of the wrapper

Specified by:
isInstance in interface WrapperHandler<OMElement>
operation - The operation
input - Input or output
Returns:

getChild

public java.lang.Object getChild(OMElement wrapper,
                                 ElementInfo childElement,
                                 int index)