org.eclipse.actf.accservice.adapt.win32.ia2
Class IA2AccessibilityAdaptor

java.lang.Object
  extended by org.eclipse.actf.accservice.adapt.win32.ia2.IA2AccessibilityAdaptor
All Implemented Interfaces:
IAdaptor

public class IA2AccessibilityAdaptor
extends Object
implements IAdaptor

Implementation for the IA2 Accesibility IAdaptor.

Author:
Mike Smith

Constructor Summary
IA2AccessibilityAdaptor()
           
 
Method Summary
 Object adapt(Object o, Class type)
          adapts the object to the given type.
 Class[] getSupportedTypes()
          returns the types to which given objects may be adapted by this adaptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IA2AccessibilityAdaptor

public IA2AccessibilityAdaptor()
Method Detail

getSupportedTypes

public Class[] getSupportedTypes()
returns the types to which given objects may be adapted by this adaptor. One of these types should be used when calling the adapt method.

Specified by:
getSupportedTypes in interface IAdaptor
Returns:
list of types to which objects can be adapted by this adaptor
See Also:
IAdaptor.adapt(Object, Class)

adapt

public Object adapt(Object o,
                    Class type)
             throws Exception
adapts the object to the given type. This method is responsible for casting or transforming or somehow producing an object of the specified type that represents a set of properties of or directly corresponds to the specified object. The type to which the object is to be adapted should be one of those returned by getSupportedTypes.

All attempts should be made to insure that this method is symmetric. That is, if object o is of type B, then:

 adapt(adapt(o, A.class), B.class) = o
 

Also note that both types A and B should be returned by getSupportedTypes.

Specified by:
adapt in interface IAdaptor
Parameters:
o - - object to be adapted
type - - the type to which the object is to be adapted
Returns:
an instance of the specified type or null if the object could not be adapted to the given type
Throws:
Exception
See Also:
IAdaptor.getSupportedTypes()