Package ch.qos.cal10n.util

Examples of ch.qos.cal10n.util.CAL10NBundle


          throws MessageConveyorException {

    Class<? extends Enum<?>> declaringClass = key.getDeclaringClass();

    String declaringClassName = declaringClass.getName();
    CAL10NBundle rb = cache.get(declaringClassName);
    if (rb == null || rb.hasChanged()) {
      rb = lookupResourceBundleByEnumClassAndLocale(declaringClass);
      cache.put(declaringClassName, 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


    String charset = annotationExtractor.extractCharset(locale);
    // use the declaring class' loader instead of
    // this.getClass().getClassLoader()
    // see also http://jira.qos.ch/browse/CAL-8
    CAL10NBundleFinderByClassloader cal10NBundleFinderByClassloader = new CAL10NBundleFinderByClassloader(declaringClass.getClassLoader());
    CAL10NBundle rb = cal10NBundleFinderByClassloader.getBundle(
            baseName, locale, charset);

    if (rb == null) {
      throw new MessageConveyorException(
              "Failed to locate resource bundle [" + baseName
View Full Code Here

TOP

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

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.