Package com.ibm.icu.util

Examples of com.ibm.icu.util.UResourceTypeMismatchException


        bundle = UResourceBundle.getBundleInstance(ULocale.getDefault());
        if (bundle == null){
            errln("UResourceBundle.getBundleInstance(ULocale) failed");
            return;
        }
        if (new UResourceTypeMismatchException("coverage") == null){
            errln("Create UResourceTypeMismatchException error");
        }
        class Stub extends UResourceBundle{
            public ULocale getULocale() {return ULocale.ROOT;}
            protected String getLocaleID() {return null;}
View Full Code Here


    static class UResourceTypeMismatchExceptionHandler extends ExceptionHandler
    {
        public Object[] getTestObjects()
        {
            Locale locales[] = SerializableTest.getLocales();
            UResourceTypeMismatchException exceptions[] = new UResourceTypeMismatchException[locales.length];
           
            for (int i = 0; i < locales.length; i += 1) {
                exceptions[i] = new UResourceTypeMismatchException(locales[i].toString());
            }
           
            return exceptions;
        }
View Full Code Here

                int[] index, boolean[] isAlias) {
            index[0] = getIndex(indexStr);
            if (index[0] > -1) {
                return handleGetImpl(index[0], table, requested, isAlias);
            }
            throw new UResourceTypeMismatchException("Could not get the correct value for index: "+ index);
        }
View Full Code Here

            return t;
        } else {
//#if defined(FOUNDATION10) || defined(J2SE13)
//##            throw new DataModuleFormatError("Actual type " + t.getType() + " != expected types " + expResTypes + ".");
//#else
            throw new DataModuleFormatError(new UResourceTypeMismatchException("Actual type " + t.getType() + " != expected types " + expResTypes + "."));
//#endif
        }
    }
View Full Code Here

            case UResourceBundle.ARRAY:
                return res.getStringArray();
            case UResourceBundle.STRING:
                return new String[]{res.getString()};
            default:
                throw new UResourceTypeMismatchException("Only accept ARRAY and STRING types.");
            }
        } catch (UResourceTypeMismatchException e){
//#if defined(FOUNDATION10) || defined(J2SE13)
//##            throw new DataModuleFormatError(e.getMessage());
//#else
View Full Code Here

      int i = indexStr.length() > 0 ? Integer.valueOf(indexStr).intValue() : -1;
      if (index != null) {
        index[0] = i;
      }
      if (i < 0) {
        throw new UResourceTypeMismatchException("Could not get the correct value for index: " + indexStr);
      }
      return createBundleObject(i, indexStr, table, requested, isAlias);
    }
View Full Code Here

            int i = indexStr.length() > 0 ? Integer.valueOf(indexStr).intValue() : -1;
            if(index != null) {
                index[0] = i;
            }
            if (i < 0) {
                throw new UResourceTypeMismatchException("Could not get the correct value for index: "+ index);
            }
            return createBundleObject(i, indexStr, table, requested, isAlias);
        }
View Full Code Here

                int[] index, boolean[] isAlias) {
            index[0] = getIndex(indexStr);
            if (index[0] > -1) {
                return handleGetImpl(index[0], table, requested, isAlias);
            }
            throw new UResourceTypeMismatchException("Could not get the correct value for index: "+ index);
        }
View Full Code Here

        protected ICUResourceBundle handleGet(String index, HashMap table, ICUResourceBundle requested) {
            int val = getIndex(index);
            if (val > -1) {
                return handleGet(val, table, requested);
            }
            throw new UResourceTypeMismatchException("Could not get the correct value for index: "+ index);
        }
View Full Code Here

     * @throws MissingResourceException
     * @throws UResourceTypeMismatchException
     * @draft ICU 3.0
     */
    public String getString() {
        throw new UResourceTypeMismatchException("");
    }
View Full Code Here

TOP

Related Classes of com.ibm.icu.util.UResourceTypeMismatchException

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.