org.eclipse.core.runtime
Interface IAdaptable
- All Known Subinterfaces:
- IActivity, IArchiveReference, IBreakpoint, IBreakpointTypeCategory, ICategory, IConfiguredSite, IConsolePageParticipant, IConsoleView, IContainer, IDebugElement, IDebugTarget, IDebugView, IEditorInput, IEditorPart, IEditorSite, IEncodedStorage, IErrorReportingExpression, IExpression, IFeature, IFeatureReference, IFile, IFileEditorInput, IFileState, IFolder, IFormPage, IImport, IIncludedFeatureReference, IIndexedValue, IInPlaceEditor, IInPlaceEditorInput, IInstallConfiguration, IInstallHandlerEntry, IIntroPart, IIntroSite, ILaunch, ILaunchConfiguration, ILaunchConfigurationType, ILaunchConfigurationWorkingCopy, ILineBreakpoint, ILocalSite, IMarker, IMemoryBlock, IMemoryBlockExtension, IMemoryRendering, INonPluginEntry, IPageSite, IPathEditorInput, IPlatformEnvironment, IPluginEntry, IProcess, IProject, IRegister, IRegisterGroup, IResource, IResourceDelta, IResourceNavigator, IReusableEditor, ISaveableWorkbenchPart, ISearchResultView, ISearchResultViewPart, ISessionDelta, ISite, ISiteFeatureReference, ISiteWithMirrors, ISourceContainer, IStackFrame, IStorage, IStorageEditorInput, ISynchronizeView, ITextEditor, IThread, IURLEntry, IValue, IVariable, IViewDescriptor, IViewPart, IViewSite, IVolume, IWatchExpression, IWatchpoint, IWizardDescriptor, IWorkbench, IWorkbenchPart, IWorkbenchPart2, IWorkbenchPartSite, IWorkbenchSite, IWorkspace, IWorkspaceRoot
- All Known Implementing Classes:
- AbstractDebugView, AbstractMemoryRendering, AbstractSourceContainer, AbstractTextEditor, AdaptableList, ArchiveReference, Breakpoint, BreakpointTypeCategory, Category, Change, CompareEditorInput, DebugElement, EditorPart, Feature, FeatureReference, FileEditorInput, FileInPlaceEditorInput, FileSystemElement, FormPage, Import, IncludedFeatureReference, InstallHandlerEntry, IntroPart, Job, Launch, LineBreakpoint, LocalFileStorage, MultiEditorInput, MultiPageEditorSite, NonPluginEntry, OperationHistoryActionHandler, PageSite, PlatformObject, PluginEntry, RepositoryProvider, ResourceNavigator, RuntimeProcess, SaveablePartAdapter, Site, SiteFeatureReference, SyncInfo, TextConsolePage, URLEntry, ViewPart, WorkbenchPart, 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]
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. |
getAdapter
public 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
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.