Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Platform
Release 3.5

Class PlatformObject

  extended by 
All Implemented Interfaces:
Direct Known Subclasses:
AbstractMemoryRendering, AbstractSourceContainer, AbstractSynchronizeParticipant, Breakpoint, BreakpointTypeCategory, CachedResourceVariant, CommonSourceNotFoundEditorInput, DebugElement, FileEditorInput, FileStore, FileSystem,, Launch, LocalFileStorage, ModelObject, ModelProvider, Refactoring, RefactoringDescriptorProxy, RefactoringHistory, RefactoringParticipant, RefactoringProcessor, RepositoryProviderType, ResourceMapping, RuntimeProcess, SynchronizationContext, SynchronizationScopeManager, ZipEntryStorage

public abstract class PlatformObject
extends Object
implements IAdaptable

An abstract superclass implementing the IAdaptable interface. getAdapter invocations are directed to the platform's adapter manager.

Note: In situations where it would be awkward to subclass this class, the same affect can be achieved simply by implementing the IAdaptable interface and explicitly forwarding the getAdapter request to an implementation of the IAdapterManager service. The method would look like:

     public Object getAdapter(Class adapter) {
         IAdapterManager manager = ...;//lookup the IAdapterManager service         
         return manager.getAdapter(this, adapter);

This class can be used without OSGi running.

Clients may subclass.

See Also:
IAdapterManager, IAdaptable

Constructor Summary
PlatformObject ()
          Constructs a new platform object.
Method Summary
  Object getAdapter ( Class adapter)
          Returns an object which is an instance of the given class associated with this object.
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public PlatformObject()
Constructs a new platform object.

Method Detail


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.

This implementation of the method declared by IAdaptable passes the request along to the platform's adapter manager; roughly Platform.getAdapterManager().getAdapter(this, adapter). Subclasses may override this method (however, if they do so, they should invoke the method on their superclass to ensure that the Platform's adapter manager is consulted).

Specified by:
getAdapter in interface IAdaptable
adapter - the class to adapt to
the adapted object or null
See Also:

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

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

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire