![JAR search and dependency download from the Maven repository](/logo.png)
org.eclipse.rap.rwt.Adaptable Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2002, 2012 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Innoopract Informationssysteme GmbH - initial API and implementation
* EclipseSource - ongoing development
******************************************************************************/
package org.eclipse.rap.rwt;
/**
* 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 = ...;
* MyExtension x = a.getAdapter( MyExtension.class );
* if( x != null ) {
* // invoke MyExtension methods on x ...
* }
*
*
*
* @since 2.0
*/
public interface Adaptable {
/**
* Returns an object which is an instance of the given class parameter
* associated with this object or null
if no association
* exists.
*
* @param adapter the lookup class
* @return an object that can be cast to the given class or null
if
* there is no adapter associated with the given class.
*/
T getAdapter( Class adapter );
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy