org.eclipse.rwt
Interface Adaptable
-
All Known Implementing Classes:
-
Display,
Widget
- public interface Adaptable
Adaptable objects lets you add interfaces to a class and lets clients
query whether an object has a particular extension. This means adaptable
objects can be dynamically extended. Adapters are created by adapter
factories, which are registered with an global adapter manager.
Adaptable a = ...;
IMyExtension x = ( IMyExtension )a.getAdapter( IMyExtension.class );
if( x != null ) {
// invoke IMyExtension methods on x ...
}
-
Since:
- 1.0
-
See Also:
-
AdapterFactory
Method Summary
|
Object
|
getAdapter
(
Class adapter)
Returns an object which is an instance of the given class parameter
associated with this object or null if no association
exists. |
getAdapter
public
Object getAdapter(
Class adapter)
-
Returns an object which is an instance of the given class parameter
associated with this object or null
if no association
exists.
-
-
Parameters:
-
adapter
- the lookup class
-
Returns:
- a object castable to the given class or
null
if
there is no adapter associated with the given class.
Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2008. All rights reserved.