com.ebmwebsourcing.easybox.api
Interface XmlObjectBinding

All Known Subinterfaces:
XmlObjectSchemaBinding

public interface XmlObjectBinding

Interface to be implemented by classes allowed to create instances of XmlObject.

Author:
mjambert

Method Summary
 boolean canWrap(java.lang.Object obj)
          Return whether or not this delegate can wrap a given internal model object.
<X extends XmlObjectNode>
X
create(XmlContext xmlContext, java.lang.Class<X> xmlObjectImplClass)
          Create a new XmlObject.
 java.lang.Class<? extends XmlObjectNode>[] getFactorableClasses()
          Get array of classes for which this factory delegate can factor objects.
 java.lang.String getName()
          Get unique name of this binding.
<X extends XmlObjectNode>
X
wrap(XmlContext xmlContext, java.lang.Class<X> xmlObjectImplClass, java.lang.Object obj)
          Wrap an internal model object into an implementation of XmlObject .
 XmlObjectNode wrap(XmlContext xmlContext, java.lang.Object obj)
          Wrap any internal model object into an XmlObject, guessing the proper XmlObject implementation.
 

Method Detail

getName

java.lang.String getName()
Get unique name of this binding.

Returns:
Name of this binding.

getFactorableClasses

java.lang.Class<? extends XmlObjectNode>[] getFactorableClasses()
Get array of classes for which this factory delegate can factor objects.

Returns:
Array of XmlObject implementation classes.

canWrap

boolean canWrap(java.lang.Object obj)
Return whether or not this delegate can wrap a given internal model object.

Parameters:
obj - Object to be wrapped into an XmlObject.
Returns:
true if this delegate can wrap obj, false otherwise.

wrap

<X extends XmlObjectNode> X wrap(XmlContext xmlContext,
                                 java.lang.Class<X> xmlObjectImplClass,
                                 java.lang.Object obj)
Wrap an internal model object into an implementation of XmlObject .

Type Parameters:
X - Type of desired XmlObject implementation.
Parameters:
xmlContext - Associated XmlContext.
xmlObjectImplClass - Concrete class to be instantiated.
obj - Model object to be wrapped.
Returns:
Newly created XmlObject.

wrap

XmlObjectNode wrap(XmlContext xmlContext,
                   java.lang.Object obj)
Wrap any internal model object into an XmlObject, guessing the proper XmlObject implementation.

Parameters:
xmlContext - Associated XmlContext.
obj - Model object to be wrapped.
Returns:
Newly created XmlObject.

create

<X extends XmlObjectNode> X create(XmlContext xmlContext,
                                   java.lang.Class<X> xmlObjectImplClass)
Create a new XmlObject.

Type Parameters:
X - Type of desired XmlObject implementation.
Parameters:
xmlContext - Associated XmlContext.
xmlObjectImplClass - Concrete class to be instantiated.
Returns:
Newly created concrete XmlObject.


Copyright © 2011 Petals Link. All Rights Reserved.