org.fishbolt.common.adapter.ext
Interface IAdapterFactory

All Known Implementing Classes:
SingleAdapterFactory

public interface IAdapterFactory

The classes that implement the IAdapterFactory interface are responsible for creating adapters for adaptable objects.

See Also:
IAdapter, IAdaptable

Method Summary
<A extends IAdapter>
A
create(java.lang.Class<A> adapterType, IAdaptable adaptable)
          In fact performs the creation of an adapter instance for the adaptable object.
 java.lang.Class<? extends IAdapter>[] getAdapterClasses()
          Declares the types of adapters, which instances can be created by the Factory.
 

Method Detail

getAdapterClasses

java.lang.Class<? extends IAdapter>[] getAdapterClasses()
Declares the types of adapters, which instances can be created by the Factory.

Returns:
the types of adapters, which instances can be created by the Factory.
See Also:
IAdapter

create

<A extends IAdapter> A create(java.lang.Class<A> adapterType,
                              IAdaptable adaptable)
In fact performs the creation of an adapter instance for the adaptable object. If the Factory does not support the adapter for this adaptable object, the returned value is null.

Type Parameters:
A - declares a type of the required adapter
Parameters:
adapterType - defines a type of the required adapter
adaptable - object for which the current adapter is being created.
Returns:
adapter for this adaptable object, the returned value is null.
See Also:
IAdapter, IAdaptable