Package ch.qos.cal10n.util

Examples of ch.qos.cal10n.util.CAL10NPropertyResourceBundle


   *
   */
  public <E extends Enum<?>> String getMessage(E key, Object... args) throws MessageConveyorException {

    String declararingClassName = key.getDeclaringClass().getName();
    CAL10NPropertyResourceBundle  rb = cache.get(declararingClassName);
    if (rb == null || rb.hasChanged()) {
      rb = lookup(key);
      cache.put(declararingClassName, rb);
    }

    String keyAsStr = key.toString();
    String value = rb.getString(keyAsStr);
    if (value == null) {
      return "No key found for " + keyAsStr;
    } else {
      if (args == null || args.length == 0) {
        return value;
View Full Code Here


      throw new MessageConveyorException(
          "Missing @BaseName annotation in enum type ["
              + key.getClass().getName() + "]. See also "
              + Cal10nConstants.MISSING_BN_ANNOTATION_URL);
    }
    CAL10NPropertyResourceBundle rb = PropertyResourceBundleFinder.getBundle(this.getClass()
        .getClassLoader(), baseName, locale);

    if(rb == null) {
      throw new MessageConveyorException("Failed to locate resource bundle [" + baseName
        + "] for locale [" + locale + "] for enum type [" + key.getDeclaringClass().getName()
View Full Code Here

TOP

Related Classes of ch.qos.cal10n.util.CAL10NPropertyResourceBundle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.