Class CCLabelUtilities
java.lang.Object
com.ibm.debug.pdt.codecoverage.core.results.CCLabelUtilities
- All Implemented Interfaces:
CCNLConstants
Utility methods to obtain label text from API labels
- Since:
- 9.0
-
Field Summary
Fields inherited from interface com.ibm.debug.pdt.codecoverage.core.results.CCNLConstants
BRAZILIAN_PORTUGUESE, CZECH, EMPTYSTRINGS, ENGLISH, FRENCH, GERMAN, HUNGARIAN, ITALIAN, JAPANESE, KOREAN, POLISH, RUSSIAN, SIMPLIFIED_CHINESE, SPANISH, TRADITIONAL_CHINESE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringencodeLabel(String labelKey, String[] parms) Given a label key and an array of zero or more parameters an encoded string is returned that can be stored into the objects that inheritICCBaseand extendCCAbstractExceptionThis format has the advantage that is does not contain translatable text.static StringencodeLabel(String labelKey, String[] parms, int language) Given a label key and an array of zero or more parameters an encoded string is returned that can be stored into the objects that inheritICCBaseand extendCCAbstractExceptionThis format has the advantage that is does not contain translatable text.static StringencodeLabel(String labelKey, String[] parms, Locale locale) Given a label key and an array of zero or more parameters an encoded string is returned that can be stored into the objects that inheritICCBaseand extendCCAbstractExceptionThis format has the advantage that is does not contain translatable text.static StringRetrieve the full label given an encoded labelstatic StringRetrieve the full label text with substitutions executed Will return the label if it is a plain text (non-encoded) labelstatic StringRetrieves the full label based on key and parametersstatic StringRetrieves the full label based on the key and parameters for the given languagestatic StringRetrieves the full label based on the key and parameters for the given localestatic StringRetrieve the full label text with substitutions executed Will return the label if it is a plain text (non-encoded) labelstatic StringgetLabelId(String encodedLabel) Return the label id or key from the encoded labelstatic voidsetLanguage(int language) Set the default language seeCCNLConstantsfor liststatic voidsetLanguage(Locale locale) Set the default language using locale
-
Constructor Details
-
CCLabelUtilities
public CCLabelUtilities()
-
-
Method Details
-
setLanguage
public static void setLanguage(int language) Set the default language seeCCNLConstantsfor list- Parameters:
language- language id as defined inCCNLConstants
-
setLanguage
Set the default language using locale- Parameters:
locale- locale for label text
-
getLabel
Retrieves the full label based on key and parameters- Parameters:
labelKey- label keyparms- substitution values- Returns:
- the label with substitutions
-
getLabel
Retrieves the full label based on the key and parameters for the given language- Parameters:
labelKey- label keyparms- substitution valueslanguage- language id as defined inCCNLConstants- Returns:
- the label with substitutions
- Since:
- 9.0
-
getLabel
Retrieves the full label based on the key and parameters for the given locale- Parameters:
labelKey- label keyparms- substitution valueslocale- locale for label text- Returns:
- the label with substitutions
- Since:
- 9.0
-
getLabel
Retrieve the full label given an encoded label- Parameters:
encodedLabel- the label key and parameter string combination or just the label key- Returns:
- full label in the default language
- Since:
- 9.0
-
getLabel
Retrieve the full label text with substitutions executed Will return the label if it is a plain text (non-encoded) label- Parameters:
encodedLabel- the label key and parameter string combination or just the label keylanguage- language as defined inCCNLConstants- Returns:
- full label text in the selected language
- Since:
- 9.0
-
getLabel
Retrieve the full label text with substitutions executed Will return the label if it is a plain text (non-encoded) label- Parameters:
encodedLabel- the label key and parameter string combination or just the label keylocale- locale for label text- Returns:
- full label text in the selected locale
- Since:
- 9.0
-
getLabelId
Return the label id or key from the encoded label- Parameters:
encodedLabel- the label key and parameter string combination or just the label key- Returns:
- label id or key or "" if passed label is invalid
-
encodeLabel
Given a label key and an array of zero or more parameters an encoded string is returned that can be stored into the objects that inheritICCBaseand extendCCAbstractExceptionThis format has the advantage that is does not contain translatable text. Some classes likeCCAbstractExceptionhave helper methods that don't require an array- Parameters:
labelKey- label keyparms- substitution values- Returns:
- encoded label string
- Since:
- 9.0
-
encodeLabel
Given a label key and an array of zero or more parameters an encoded string is returned that can be stored into the objects that inheritICCBaseand extendCCAbstractExceptionThis format has the advantage that is does not contain translatable text. Some classes likeCCAbstractExceptionhave helper methods that don't require an array- Parameters:
labelKey- label keyparms- substitution valueslanguage- language of label - used if message only appears in the specified language seeCCNLConstants- Returns:
- encoded label string
- Since:
- 9.0
-
encodeLabel
Given a label key and an array of zero or more parameters an encoded string is returned that can be stored into the objects that inheritICCBaseand extendCCAbstractExceptionThis format has the advantage that is does not contain translatable text. Some classes likeCCAbstractExceptionhave helper methods that don't require an array- Parameters:
labelKey- label keyparms- substitution valueslocale- locale of label - used if message only appears in the specified language- Returns:
- encoded label string
- Since:
- 9.0
-