Runtime

## org.eclipse.gmf.runtime.common.core.service
Interface IProviderPolicy

    public interface IProviderPolicy

The interface for all service providers lightweight's implementation. Specifies a single part of the contract between a service and its providers:

- A service can request a provider whether it wants to support a given request

Service implementers are not expected to implement this interface.

Service provider implementers should implement this interface directly in a lightweight plug-in should they need to be more aggressive at preventing the loading of the provider heavyweight plug-in. A provider need to expose the class implementing this interface in the class attribute of a Policy sub-element in their provider extension descriptor.

Provider's plugin.xml

         <extension
            id="..."
            name="..."
            point="...">
            <XXXProvider
               class="...">
               <Priority
                  name="...">
               </Priority>
               <Policy
                  class="com.example.myClass"
                  plugin="com.example.myLightWeightPlugin"/>
            </XXXProvider>
         </extension>

Method Summary
`boolean` `provides(IOperation operation)` Indicates whether this provider provides the specified operation.

Method Detail

### provides

    boolean provides(IOperation operation)

  Indicates whether this provider provides the specified operation.

  Providers generally cast the operation to a service specific `IOperation`-derived class in order to determine whether they support the request.

  Parameters:
    `operation` - The operation in question.
  Returns:
    `true` if this provider provides the operation; `false` otherwise.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.