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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

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

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.services
Interface IServiceLocator

All Known Subinterfaces:
IEditorSite, IIntroSite, IPageSite, IViewSite, IWorkbench, IWorkbenchPartSite, IWorkbenchSite, IWorkbenchWindow
All Known Implementing Classes:
MultiPageEditorSite, PageSite

public interface IServiceLocator

A component with which one or more services are registered. The services can be retrieved from this locator using some key -- typically the class representing the interface the service must implement. For example:

 IHandlerService service = (IHandlerService) workbenchWindow
                .getService(IHandlerService.class);
 

This interface is not to be implemented or extended by clients.

Since:
3.2

Method Summary
  Object getService ( Class api)
          Retrieves the service corresponding to the given API.
 boolean hasService ( Class api)
          Whether this service exists within the scope of this service locator.
 

Method Detail

getService

Object getService(
Class api)
Retrieves the service corresponding to the given API.

Parameters:
api - This is the interface that the service implements. Must not be null.
Returns:
The service, or null if no such service could be found.

hasService

boolean hasService(
Class api)
Whether this service exists within the scope of this service locator. This does not include looking for the service within the scope of the parents. This method can be used to determine whether a particular service supports nesting in this scope.

Parameters:
api - This is the interface that the service implements. Must not be null.
Returns:
true iff the service locator can find a service for the given API; false otherwise.

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