com.sun.istack.localization.Localizable Maven / Gradle / Ivy
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package com.sun.istack.localization;
import java.util.Locale;
import java.util.ResourceBundle;
/**
* Localizable message.
*
* @author WS Development Team
*/
public interface Localizable {
/**
* Gets the key in the resource bundle.
*
* @return
* if this method returns {@link #NOT_LOCALIZABLE},
* that means the message is not localizable, and
* the first item of {@link #getArguments()} array
* holds a String.
*/
public String getKey();
/**
* Returns the arguments for message formatting.
*
* @return
* can be an array of length 0 but never be null.
*/
public Object[] getArguments();
public String getResourceBundleName();
public ResourceBundle getResourceBundle(Locale locale);
/**
* Special constant that represents a message that
* is not localizable.
*
*
* Use of "new" is to create an unique instance.
*/
public static final String NOT_LOCALIZABLE = "\u0000";
}