org.abstracthorizon.danube.adapter
Interface AdapterFactory

All Known Implementing Classes:
AdapterManager, SocketChannelConnection, SocketConnection

public interface AdapterFactory

This interface is insipired by the similar from eclipse project

Author:
Daniel Sendula

Method Summary
<T> T
adapt(T object, Class<T> cls)
          Adopts given object to the instance of the asked class
<T> Class<T>[]
getAdaptingClasses(T object)
          Returns list of classes to which given object can be adopted to by this adopter factory
 

Method Detail

adapt

<T> T adapt(T object,
            Class<T> cls)
Adopts given object to the instance of the asked class

Parameters:
object - object to he adopted
cls - asked class
Returns:
adopted given object to the instance of the asked class

getAdaptingClasses

<T> Class<T>[] getAdaptingClasses(T object)
Returns list of classes to which given object can be adopted to by this adopter factory

Returns:
list of classes to which given object can be adopted to


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.