org.apache.tuscany.sca.databinding.jaxb
Class JAXBWrapperHandler

java.lang.Object
  extended by org.apache.tuscany.sca.databinding.jaxb.JAXBWrapperHandler
All Implemented Interfaces:
WrapperHandler<java.lang.Object>

public class JAXBWrapperHandler
extends java.lang.Object
implements WrapperHandler<java.lang.Object>

JAXB WrapperHandler implementation


Constructor Summary
JAXBWrapperHandler()
           
 
Method Summary
 java.lang.Object create(Operation operation, boolean input)
          Create a wrapper element
 java.util.List getChildren(java.lang.Object 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 wrapper, Operation operation, boolean input)
          Check if the given data is an instance of the wrapper
 void setChild(java.lang.Object wrapper, int i, ElementInfo childElement, java.lang.Object value)
           
 void setChildren(java.lang.Object 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

JAXBWrapperHandler

public JAXBWrapperHandler()
Method Detail

create

public java.lang.Object create(Operation operation,
                               boolean input)
Description copied from interface: WrapperHandler
Create a wrapper element

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

setChildren

public void setChildren(java.lang.Object 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<java.lang.Object>
Parameters:
wrapper - The wrapper object
childObjects - The child objects
operation - The operation
input - Is it for input or output

setChild

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

getChildren

public java.util.List getChildren(java.lang.Object 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<java.lang.Object>
Parameters:
wrapper - The wrapper object
operation - The operation
input - Is it for input or output
Returns:
child elements under the wrapper
See Also:
WrapperHandler.getChildren(java.lang.Object, Operation, boolean)

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<java.lang.Object>
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 wrapper,
                          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<java.lang.Object>
operation - The operation
input - Input or output
Returns:
See Also:
WrapperHandler.isInstance(java.lang.Object, Operation, boolean)