com.ebmwebsourcing.easybox.api
Interface XmlObjectFactory


public interface XmlObjectFactory


Method Summary
<X extends XmlObjectNode>
X
create(java.lang.Class<X> xmlObjectClassOrInterface)
          Create a new XmlObjectNode given its interface class.
 XmlObjectNode wrap(java.lang.Object obj)
          Wrap any object into an implementation of XmlObjectNode.
<X extends XmlObjectNode>
X
wrap(java.lang.Object obj, java.lang.Class<X> xmlObjectClassOrInterface)
          Wrap any object into a specific implementation of XmlObjectNode.
 

Method Detail

wrap

XmlObjectNode wrap(java.lang.Object obj)
Wrap any object into an implementation of XmlObjectNode. Implementation class is guessed from known meta-information.

Parameters:
obj - Internal model object to be wrapped.
Returns:
Newly created concrete XmlObjectNode.

wrap

<X extends XmlObjectNode> X wrap(java.lang.Object obj,
                                 java.lang.Class<X> xmlObjectClassOrInterface)
Wrap any object into a specific implementation of XmlObjectNode.

Type Parameters:
X - Type of desired XmlObjectNode interface.
Parameters:
obj - Model object to be wrapped.
xmlObjectClassOrInterface - Desired XmlObjectNode interface class. For convenience, one can also provide directly the desired implementation class to prevent unnecessary lookup in metadata.
Returns:
Newly created concrete XmlObjectNode.

create

<X extends XmlObjectNode> X create(java.lang.Class<X> xmlObjectClassOrInterface)
Create a new XmlObjectNode given its interface class. Implementation class is guessed from known meta-information.

Type Parameters:
X - Class of XmlObjectNode to be created.
Parameters:
xmlObjectClassOrInterface - Class of XmlObjectNode to be created.
Returns:
Newly created XmlObjectNode.


Copyright © 2011 Petals Link. All Rights Reserved.