JBoss Logging I18n Tools 1.0.0.Beta7

org.jboss.logging.util
Class TranslationHelper

java.lang.Object
  extended by org.jboss.logging.util.TranslationHelper

public final class TranslationHelper
extends Object

Utility class to work with translation filename.

Author:
Kevin Pollet - SERLI - (kevin.pollet@serli.com)

Method Summary
static String getEnclosingTranslationClassName(String translationClassName)
          Returns the enclosing translation class name for the given translation class name.
static String getEnclosingTranslationFileName(String translationFileName)
          Returns the enclosing translation file name for the given translation file name.
static String getTranslationClassNameSuffix(String translationFileName)
          Get the class name suffix to be added to the generated class for the given translation file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTranslationClassNameSuffix

public static String getTranslationClassNameSuffix(String translationFileName)
Get the class name suffix to be added to the generated class for the given translation file name.

Parameters:
translationFileName - the translation file name
Returns:
the class name suffix corresponding to the given translation filename
Throws:
NullPointerException - if translationFileName is null or not valid

getEnclosingTranslationFileName

public static String getEnclosingTranslationFileName(String translationFileName)
Returns the enclosing translation file name for the given translation file name.

If the given translation file name is InterfaceName.i18n_locale the given translation file name is returned.

Parameters:
translationFileName - the translation file name
Returns:
the enclosing file name
Throws:
NullPointerException - if translationFileName is null

getEnclosingTranslationClassName

public static String getEnclosingTranslationClassName(String translationClassName)
Returns the enclosing translation class name for the given translation class name. If the given translation class name is the upper class name then the parameter class name is returned.

Parameters:
translationClassName - the translation class name
Returns:
the enclosing class name
Throws:
NullPointerException - if translationClassName is null

JBoss Logging I18n Tools 1.0.0.Beta7

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.