Runtime

## org.eclipse.gmf.runtime.common.core.service
Class Service.ProviderDescriptor

    java.lang.Object
      org.eclipse.gmf.runtime.common.core.service.AbstractProvider
          org.eclipse.gmf.runtime.common.core.service.Service.ProviderDescriptor

All Implemented Interfaces:
  java.util.EventListener, IProvider, IProviderChangeListener

Direct Known Subclasses:
  ActionFilterService.ProviderDescriptor, ActivityFilterProviderDescriptor, DragDropListenerService.ProviderDescriptor, EditPartService.ProviderDescriptor, GlobalActionHandlerService.ProviderDescriptor, IconService.ProviderDescriptor, MarkerNavigationService.MarkerNavigationProviderDescriptor, PropertiesService.PropertiesProviderDescriptor, TransferAdapterService.ProviderDescriptor, ViewService.ProviderDescriptor

Enclosing class:
  Service

public static class Service.ProviderDescriptor
extends AbstractProvider
implements IProvider, IProviderChangeListener

A descriptor for providers defined by a configuration element.

Field Summary
`protected static java.lang.String` `A_CLASS` The name of the 'class' XML attribute.
`protected static java.lang.String` `A_PLUGIN` The name of the 'plugin' XML attribute.
`protected static java.lang.String` `E_POLICY` The name of the 'Policy' XML element.
`protected IProviderPolicy` `policy` The policy associated with this descriptor's provider (if specified).
`protected boolean` `policyInitialized`
`protected IProvider` `provider` The provider for which this object is a descriptor.

Constructor Summary
`protected` `Service.ProviderDescriptor(IConfigurationElement element)` Constructs a new provider descriptor for the specified configuration element.

Method Summary
`protected IConfigurationElement` `getElement()` Retrieves the configuration element describing this descriptor's provider.
`protected IProviderPolicy` `getPolicy()` Retrieves the policy associated with this descriptor's provider (if specified).
`IProvider` `getProvider()` Retrieves the provider for which this object is a descriptor.
`void` `providerChanged(ProviderChangeEvent event)` Handles an event indicating that a provider has changed.
`boolean` `provides(IOperation operation)` Indicates whether this provider descriptor can provide the functionality described by the specified `operation`.
`java.lang.String` `toString()` Returns the provider's class name, if it can be found.

Methods inherited from class org.eclipse.gmf.runtime.common.core.service.AbstractProvider
`addProviderChangeListener, fireProviderChange, removeProviderChangeListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.eclipse.gmf.runtime.common.core.service.IProvider
`addProviderChangeListener, removeProviderChangeListener`

Field Detail

### policyInitialized

    protected boolean policyInitialized

### A_CLASS

    protected static final java.lang.String A_CLASS

  The name of the 'class' XML attribute.

  See Also:
    Constant Field Values

### A_PLUGIN

    protected static final java.lang.String A_PLUGIN

  The name of the 'plugin' XML attribute.

  See Also:
    Constant Field Values

### E_POLICY

    protected static final java.lang.String E_POLICY

  The name of the 'Policy' XML element.

  See Also:
    Constant Field Values

### provider

    protected IProvider provider

  The provider for which this object is a descriptor.

### policy

    protected IProviderPolicy policy

  The policy associated with this descriptor's provider (if specified).

Constructor Detail

### Service.ProviderDescriptor

    protected Service.ProviderDescriptor(IConfigurationElement element)

  Constructs a new provider descriptor for the specified configuration element.

Parameters:
  `element` - The configuration element describing the provider.

Method Detail

### getElement

    protected final IConfigurationElement getElement()

  Retrieves the configuration element describing this descriptor's provider.

  Returns:
    The configuration element describing this descriptor's provider.

### getProvider

    public IProvider getProvider()

  Retrieves the provider for which this object is a descriptor. Lazy-initializes the value by instantiating the class described by this provider descriptor's configuration element.

  Returns:
    The provider for which this object is a descriptor.

### getPolicy

    protected IProviderPolicy getPolicy()

  Retrieves the policy associated with this descriptor's provider (if specified). Lazy-initializes the value by instantiating the class described by this provider descriptor's configuration element, if specified.

  Returns:
    The policy associated with this descriptor's provider (if specified).

### provides

    public boolean provides(IOperation operation)

  Indicates whether this provider descriptor can provide the functionality described by the specified `operation`.

  Specified by:
    `provides` in interface `IProvider`
  Parameters:
    `operation` - The operation in question.
  Returns:
    `true` if this descriptor's policy or provider provides the operation; `false` otherwise.

### providerChanged

    public void providerChanged(ProviderChangeEvent event)

  Handles an event indicating that a provider has changed.

  Specified by:
    `providerChanged` in interface `IProviderChangeListener`
  Parameters:
    `event` - The provider change event to be handled.

### toString

    public java.lang.String toString()

  Returns the provider's class name, if it can be found.

Runtime

Guidelines for using Eclipse APIs.

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