## org.eclipse.emf.common.util
Interface ResourceLocator

All Known Implementing Classes:
  ChangeDescriptionItemProvider, ChangeEditPlugin, ChangeEditPlugin.Implementation, ChangePlugin, ChangePlugin.Implementation, CheatSheetsPlugin, CheatSheetsPlugin.Implementation, ChildCreationExtenderManager, CodeGenEcorePlugin, CodeGenEcorePlugin.Implementation, CodeGenPlugin, CodeGenPlugin.Implementation, CommonPlugin, CommonPlugin.Implementation, CommonUIPlugin, CommonUIPlugin.Implementation, ComplexTypeConverterItemProvider, ConverterPlugin, ConverterPlugin.Implementation, DataBindingEditPlugin, DataBindingEditPlugin.Implementation, DataBindingPlugin, DataBindingPlugin.Implementation, DelegatingResourceLocator, EAnnotationItemProvider, EAttributeItemProvider, EClassifierItemProvider, EClassItemProvider, EclipseUIPlugin, Ecore2EcoreEditorPlugin, Ecore2EcoreEditorPlugin.Implementation, Ecore2EcoreMappingRootItemProvider, Ecore2EcorePlugin, Ecore2EcorePlugin.Implementation, Ecore2XMLUIPlugin, Ecore2XMLUIPlugin.Implementation, EcoreEditorPlugin, EcoreEditorPlugin.Implementation, EcoreEditPlugin, EcoreEditPlugin.Implementation, EcoreImporterPlugin, EcoreImporterPlugin.Implementation, EcorePlugin, EcorePlugin.Implementation, EDataTypeItemProvider, EEnumItemProvider, EEnumLiteralItemProvider, EFactoryItemProvider, EGenericTypeItemProvider, EMFEditPlugin, EMFEditPlugin.Implementation, EMFEditUIPlugin, EMFEditUIPlugin.Implementation, EMFPlugin, EMFPlugin.EclipsePlugin, EModelElementItemProvider, ENamedElementItemProvider, ENamedElementToXMLInfoMapEntryItemProvider, EObjectItemProvider, EObjectToChangesMapEntryItemProvider, EOperationItemProvider, EPackageItemProvider, EParameterItemProvider, EReferenceItemProvider, EStringToStringMapEntryItemProvider, EStructuralFeatureItemProvider, ETypedElementItemProvider, ETypeParameterItemProvider, ExporterPlugin, ExporterPlugin.Implementation, FeatureChangeItemProvider, FeatureMapEntryItemProvider, FunctionNamePairItemProvider, FunctionPairItemProvider, GenAnnotationItemProvider, GenBaseItemProvider, GenClassItemProvider, GenDataTypeItemProvider, GenEnumItemProvider, GenEnumLiteralItemProvider, GenFeatureItemProvider, GenModelEditPlugin, GenModelEditPlugin.Implementation, GenModelItemProvider, GenOperationItemProvider, GenPackageItemProvider, ImporterPlugin, ImporterPlugin.Implementation, ItemProviderAdapter, JavaImporterPlugin, JavaImporterPlugin.Implementation, ListChangeItemProvider, MappingHelperItemProvider, MappingItemProvider, MappingItemProviderAdapter, MappingPlugin, MappingPlugin.Implementation, MappingRootItemProvider, MappingStrategyItemProvider, ReflectiveItemProvider, ResourceChangeItemProvider, ResourceItemProvider, ResourceSetItemProvider, RoseImporterPlugin, RoseImporterPlugin.Implementation, TreeNodeItemProvider, TypeConverterItemProvider, XMIPlugin, XMIPlugin.Implementation, XMLInfoItemProvider, XMLMapItemProvider

    public interface ResourceLocator

A locator of Java resources.

Method Summary
`java.net.URL` `getBaseURL()` Returns the URL from which all resources are based.
`java.lang.Object` `getImage(java.lang.String key)` Returns the description that can be used to create the image resource associated with the key.
`java.lang.String` `getString(java.lang.String key)` Returns the string resource associated with the key.
`java.lang.String` `getString(java.lang.String key, boolean translate)` Returns the string resource associated with the key.
`java.lang.String` `getString(java.lang.String key, java.lang.Object[] substitutions)` Returns a string resource associated with the key, and performs substitutions.
`java.lang.String` `getString(java.lang.String key, java.lang.Object[] substitutions, boolean translate)` Returns a string resource associated with the key, and performs substitutions.

Method Detail

### getBaseURL

    java.net.URL getBaseURL()

  Returns the URL from which all resources are based.

  Returns:
    the URL from which all resources are based.

### getImage

    java.lang.Object getImage(java.lang.String key)

  Returns the description that can be used to create the image resource associated with the key. The description will typically be in the form of a URL to the image data. Creation of an actual image depends on the GUI environment; within Eclipse, org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry can be used.

  Parameters:
    `key` - the key of the image resource.
  Returns:
    the description on the image resource.

### getString

    java.lang.String getString(java.lang.String key)

  Returns the string resource associated with the key.

  Parameters:
    `key` - the key of the string resource.
  Returns:
    the string resource associated with the key.

### getString

    java.lang.String getString(java.lang.String key,
                               boolean translate)

  Returns the string resource associated with the key.

  Parameters:
    `key` - the key of the string resource.
    `translate` - whether the result is to be translated to the current locale.
  Returns:
    the string resource associated with the key.

### getString

    java.lang.String getString(java.lang.String key,
                               java.lang.Object[] substitutions)

  Returns a string resource associated with the key, and performs substitutions.

  Parameters:
    `key` - the key of the string.
    `substitutions` - the message substitutions.
  Returns:
    a string resource associated with the key.
  See Also:
    `getString(String)`, `MessageFormat.format(String, Object[])`

### getString

    java.lang.String getString(java.lang.String key,
                               java.lang.Object[] substitutions,
                               boolean translate)

  Returns a string resource associated with the key, and performs substitutions.

  Parameters:
    `key` - the key of the string.
    `substitutions` - the message substitutions.
    `translate` - whether the result is to be translated to the current locale.
  Returns:
    a string resource associated with the key.
  See Also:
    `getString(String)`, `MessageFormat.format(String, Object[])`

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.