KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > runtime > internal > adaptor > BundleLocalizationImpl


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.runtime.internal.adaptor;
12
13 import java.util.ResourceBundle JavaDoc;
14 import org.eclipse.osgi.service.localization.BundleLocalization;
15 import org.osgi.framework.Bundle;
16
17 /**
18  * The implementation of the service that gets ResourceBundle objects from a given
19  * bundle with a given locale.
20  *
21  * <p>Internal class.</p>
22  */

23
24 public class BundleLocalizationImpl implements BundleLocalization {
25     /**
26      * The getLocalization method gets a ResourceBundle object for the given
27      * locale and bundle.
28      *
29      * @return A <code>ResourceBundle</code> object for the given bundle and locale.
30      * If null is passed for the locale parameter, the default locale is used.
31      */

32     public ResourceBundle JavaDoc getLocalization(Bundle JavaDoc bundle, String JavaDoc locale) {
33         return ((org.eclipse.osgi.framework.internal.core.AbstractBundle) (bundle)).getResourceBundle(locale);
34     }
35 }
36
Popular Tags