Eclipse Platform Release 3.7

## org.eclipse.core.runtime
Interface IAdaptable

All Known Subinterfaces:
  IActivity, IAggregateWorkingSet, IArchiveReference, IArtifactRepository, IBreakpoint, IBreakpointTypeCategory, IBuildConfiguration, ICategory, ICommonViewerSite, ICommonViewerWorkbenchSite, IComparableContribution, ICompositeRepository<T>, IConfiguredSite, IConsolePageParticipant, IConsoleView, IContainer, IDebugElement, IDebugTarget, IDebugView, IEditorInput, IEditorPart, IEditorSite, IEncodedStorage, IErrorReportingExpression, IExpression, IFeature, IFeatureReference, IFile, IFileArtifactRepository, IFileEditorInput, IFileState, IFileStore, IFileSystem, IFolder, IFormPage, IImport, IIncludedFeatureReference, IIndexedValue, IInPlaceEditor, IInPlaceEditorInput, IInstallConfiguration, IInstallHandlerEntry, IIntroPart, IIntroSite, ILaunch, ILaunchConfiguration, ILaunchConfigurationType, ILaunchConfigurationWorkingCopy, ILineBreakpoint, ILocalSite, IMarker, IMemoryBlock, IMemoryBlockExtension, IMemoryRendering, IMetadataRepository, INavigatorContentExtension, INonPluginEntry, IPageSite, IPathEditorInput, IPlatformEnvironment, IPluginEntry, IProcess, IProject, IRegister, IRegisterGroup, IRepositionableMemoryRendering, IRepository<T>, IResettableMemoryRendering, IResource, IResourceDelta, IResourceNavigator, IReusableEditor, ISaveableWorkbenchPart, ISearchResultView, ISearchResultViewPart, ISessionDelta, ISite, ISiteFeatureReference, ISiteWithMirrors, ISourceContainer, IStackFrame, IStorage, IStorageEditorInput, ISynchronizeParticipant, ISynchronizeView, ITextEditor, IThread, IURIEditorInput, IURLEntry, IValue, IVariable, IViewDescriptor, IViewPart, IViewSite, IVolume, IWatchExpression, IWatchpoint, IWizardDescriptor, IWorkbench, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPart3, IWorkbenchPartSite, IWorkbenchSite, IWorkingSet, IWorkspace, IWorkspaceRoot

All Known Implementing Classes:
  AbstractArtifactRepository, org.eclipse.debug.internal.ui.views.memory.renderings.AbstractBaseTableRendering, AbstractDebugView, AbstractDecoratedTextEditor, AbstractMemoryRendering, AbstractMetadataRepository, AbstractMultiEditor, AbstractRefactoringDescriptorResourceMapping, AbstractRefactoringHistoryResourceMapping, AbstractRepository, AbstractSourceContainer, AbstractSynchronizeParticipant, AbstractTableRendering, AbstractTextEditor, AbstractTextEditor.TextEditorSavable, AbstractTextRendering, AdaptableList, ArchiveReference, ArchiveReferenceModel, ArchiveSourceContainer, BookmarkNavigator, Breakpoint, BreakpointTypeCategory, CachedResourceVariant, Category, CategoryModel, Change, CommonNavigator, CommonSourceNotFoundEditor, CommonSourceNotFoundEditorInput, CompareEditorInput, CompareViewerPane, CompareViewerSwitchingPane, CompositeChange, CompositeResourceMapping, CompositeSourceContainer, ContainerSourceContainer, ContentEntryModel, ContentOutline, CopyParticipant, CopyProcessor, CopyRefactoring, CreateParticipant, CustomizableIntroPart, DebugElement, DefaultRepositoryProviderType, DefaultSourceContainer, DeleteParticipant, DeleteProcessor, DeleteRefactoring, DeleteResourceChange, DirectorySourceContainer, DocumentChange, DocumentRangeNode, EditorPart, org.eclipse.ui.internal.views.markers.ExtendedMarkersView, ExternalArchiveSourceContainer, Feature, FeatureModel, FeatureReference, FeatureReferenceModel, FileEditorInput, FileInPlaceEditorInput, FileStore, FileStoreEditorInput, FileSystem, FileSystemElement, FolderSourceContainer, FormEditor, FormPage, HistoryPage, HistoryPageCompareEditorInput, HistoryPageSaveablePart, Import, ImportModel, IncludedFeatureReference, IncludedFeatureReferenceModel, InstallHandlerEntry, InstallHandlerEntryModel, org.eclipse.core.internal.jobs.InternalJob, org.eclipse.core.internal.resources.InternalWorkspaceJob, IntroPart, Job, Launch, LineBreakpoint, LoadMetadataRepositoryJob, LocalFileStorage, MarkerSupportView, MergeContext, ModelObject, ModelProvider, ModelSynchronizeParticipant, MoveParticipant, MoveProcessor, MoveRefactoring, MoveResourceChange, MultiEditor, MultiEditorInput, MultiPageEditor, MultiPageEditorPart, MultiPageEditorSite, MultiStateTextFileChange, NonPluginEntry, NonPluginEntryModel, NullChange, OperationHistoryActionHandler, PageBookView, PageCompareEditorInput, PageSaveablePart, PageSite, ParticipantPageCompareEditorInput, ParticipantPageSaveablePart, PendingUpdateAdapter, PlatformObject, PluginEntry, PluginEntryModel, ProcessorBasedRefactoring, ProfileModificationJob, ProjectExplorer, ProjectSourceContainer, PropertySheet, PropertySheetPage, ProvisioningJob, RedoActionHandler, Refactoring, RefactoringDescriptorProxy, RefactoringHistory, RefactoringParticipant, RefactoringProcessor, RenameParticipant, RenameProcessor, RenameRefactoring, RenameResourceChange, RepositoryProvider, RepositoryProviderType, ResourceChange, ResourceMapping, ResourceNavigator, RuntimeProcess, Saveable, SaveableCompareEditorInput, SaveableComparison, SaveablePartAdapter, SharedHeaderFormEditor, Site, SiteFeatureReference, SiteFeatureReferenceModel, SiteModel, StatusAdapter, StatusTextEditor, StructureRootNode, SubscriberMergeContext, SubscriberParticipant, SubscriberScopeManager, SynchronizationContext, SynchronizationScopeManager, SyncInfo, SyncInfoCompareInput, TaskList, TemplatesView, TextChange, TextConsolePage, TextEditBasedChange, TextEditor, TextFileChange, TextMergeViewer, UIJob, UndoActionHandler, UndoTextFileChange, URLEntry, URLEntryModel, ViewPart, WorkbenchJob, WorkbenchPart, WorkingSetSourceContainer, WorkspaceJob, WorkspaceSourceContainer, ZipEntryStorage

    public interface IAdaptable

An interface for an adaptable object.

Adaptable objects can be dynamically extended to provide different interfaces (or "adapters"). Adapters are created by adapter factories, which are in turn managed by type by adapter managers.

For example,

         IAdaptable a = [some adaptable];
         IFoo x = (IFoo)a.getAdapter(IFoo.class);
         if (x != null)
             [do IFoo things with x]

This interface can be used without OSGi running.

Clients may implement this interface, or obtain a default implementation of this interface by subclassing `PlatformObject`.

See Also:
  `IAdapterFactory`, `IAdapterManager`, `PlatformObject`

Method Summary
`Object` `getAdapter(Class adapter)` Returns an object which is an instance of the given class associated with this object.

Method Detail

### getAdapter

    Object getAdapter(Class adapter)

  Returns an object which is an instance of the given class associated with this object. Returns `null` if no such object can be found.

  Parameters:
    `adapter` - the adapter class to look up
  Returns:
    a object castable to the given class, or `null` if this object does not have an adapter for the given class

Eclipse Platform Release 3.7

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.