public class ResourceBundleUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASS_SUFFIX |
| Constructor and Description |
|---|
ResourceBundleUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
convertBundleNameToColonSyntax(String bundleName)
This methods converts a resource bundle qualified name in "dotted syntax"
to use "colon syntax".
|
static Collection<ICompilationUnit> |
findCompilationUnits(String bundleName,
ICompilerProject project,
Collection<ICompilerProblem> errors)
Find all the compilation units associated with the specified resource bundle name.
|
static String |
getLocale(String qualifiedName)
Extracts the locale from the specified qualified name for an auto generated
resource bundle class.
|
static String |
getQualifiedName(String locale,
String bundleName)
Returns the qualified name for the auto generated resource bundle class for a
specified locale and a bundleName.
|
static void |
resolveDependencies(String bundleName,
ICompilationUnit refCompUnit,
ICompilerProject project,
ISourceLocation location,
Collection<ICompilerProblem> errors)
Resolving the references to the specified resourceBundleName and adds the
necessary dependency from the specified compilation unit to resolved
resource bundle's compilation unit.
|
public static final String CLASS_SUFFIX
public static String getQualifiedName(String locale, String bundleName)
locale - locale of the resource bundlebundleName - qualified name of the bundlepublic static String getLocale(String qualifiedName)
qualifiedName - the fully qualified class name for a resource bundlepublic static String convertBundleNameToColonSyntax(String bundleName)
bundleName - qualified name of resource bundlepublic static void resolveDependencies(String bundleName, ICompilationUnit refCompUnit, ICompilerProject project, ISourceLocation location, Collection<ICompilerProblem> errors) throws InterruptedException
bundleName - resource bundle namerefCompUnit - compilation unit that has a reference to the specified
resource bundle namelocation - location of the resource bundle's occurrence in the file
associated with the specified compilation uniterrors - error collection to collect problemsInterruptedExceptionpublic static Collection<ICompilationUnit> findCompilationUnits(String bundleName, ICompilerProject project, Collection<ICompilerProblem> errors) throws InterruptedException
bundleName - name of the resource bundleproject - associated projecterrors - error collection to collect problemsInterruptedExceptionCopyright © 2016 The Apache Software Foundation. All rights reserved.