From e1bea0c0687c5f4551b3a6058ec37ce3705fa6cc Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Sun, 3 Jun 2007 23:18:43 +0000 Subject: libjava/classpath/ChangeLog.gcj: 2007-05-31 Matthias Klose * javax/management/NotificationBroadcasterSupport.java (getNotificationInfo): Add cast. * native/jni/qt-peer/Makefile.am (AM_CXXFLAGS): Add libstdc++ include directories. * native/jni/qt-peer/Makefile.in: Regenerate. libjava/ChangeLog: 2007-06-03 Matthias Klose * java/io/natFileWin32.cc (setFilePermissions): New (stub only). _access: Handle EXEC query, stub only. 2007-06-03 Matthias Klose Merged from classpath: * gnu/java/nio/SelectorProviderImpl.java: Whitespace merge. * java/lang/System.java(inheritedChannel): New. * java/lang/Character.java: Remove stray`;'. * java/net/MulticastSocket.java: Merged. * java/text/DateFormatSymbols.java(getInstance): New, comment updates. * java/text/Collator.java(getInstance): Merged. * java/util/Calendar.java: New attributes ALL_STYLES, SHORT, LONG. getDisplayName, getDisplayNames: New. * java/util/logging/Logger.java: Merged. * Regenerate .class and .h files. 2007-06-03 Matthias Klose * java/io/File.java: Merge with classpath-0.95, new method setFilePermissions, new attribute EXEC. * java/io/natFilePosix.cc (setFilePermissions): New. _access: Handle EXEC query. * classpath/lib/java/io/File.class, java/io/File.h: Regenerate. 2007-06-03 Matthias Klose Imported GNU Classpath 0.95. * classpath/Makefile.in, classpath/native/jni/midi-dssi/Makefile.in, classpath/native/jni/classpath/Makefile.in, classpath/native/jni/Makefile.in, classpath/native/jni/gconf-peer/Makefile.in, classpath/native/jni/java-io/Makefile.in, classpath/native/jni/native-lib/Makefile.in, classpath/native/jni/java-util/Makefile.in, classpath/native/jni/midi-alsa/Makefile.in, classpath/native/jni/java-lang/Makefile.in, classpath/native/jni/java-nio/Makefile.in, classpath/native/jni/java-net/Makefile.in, classpath/native/jni/xmlj/Makefile.in, classpath/native/jni/qt-peer/Makefile.in, classpath/native/jni/gtk-peer/Makefile.in, classpath/native/Makefile.in, classpath/native/jawt/Makefile.in, classpath/native/fdlibm/Makefile.in, classpath/native/plugin/Makefile.in, classpath/resource/Makefile.in, classpath/scripts/Makefile.in, classpath/tools/Makefile.in, classpath/doc/Makefile.in, classpath/doc/api/Makefile.in, classpath/lib/Makefile.in, classpath/external/Makefile.in, classpath/external/jsr166/Makefile.in, classpath/external/sax/Makefile.in, classpath/external/w3c_dom/Makefile.in, classpath/external/relaxngDatatype/Makefile.in, classpath/include/Makefile.in, classpath/examples/Makefile.in: Regenerate. * classpath/config.guess, classpath/config.sub, classpath/ltmain.sh : Update. * classpath/configure, classpath/depcomp, classpath/missing, classpath/aclocal.m4, classpath/install-sh: Regenerate. * gnu/classpath/Configuration.java (CLASSPATH_VERSION): Now 0.95. * sources.am: Regenerate. * Makefile.in: Regenerate. * Update the .class files and generated CNI header files, add new .class and generated CNI header files. * Remove generated files for removed java source files: classpath/gnu/java/net/BASE64.java, classpath/gnu/java/security/util/Base64.java, classpath/gnu/java/awt/peer/gtk/GThreadMutex.java, classpath/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java, classpath/gnu/java/awt/font/autofit/Scaler.java, classpath/gnu/classpath/jdwp/util/Value.java, classpath/gnu/javax/net/ssl/Base64.java. * Remove empty directories. * Makefile.am(nat_source_files): Add natVMOperatingSystemMXBeanImpl.cc. * java/lang/Class.java(setAccessible): Merge from classpath. * java/util/Locale.java: Remove. * gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java, gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc: New. * gcj/javaprims.h: Update class declarations. * scripts/classes.pl: Update usage. * HACKING: Mention to build all peers. From-SVN: r125302 --- libjava/java/util/AbstractMap$SimpleEntry.h | 2 + .../java/util/AbstractMap$SimpleImmutableEntry.h | 2 + libjava/java/util/Arrays.h | 29 + libjava/java/util/Calendar.h | 5 + libjava/java/util/Calendar.java | 250 +++++- libjava/java/util/Collections$LIFOQueue.h | 31 + libjava/java/util/Collections$MapSet.h | 30 + ...lections$UnmodifiableMap$UnmodifiableEntrySet.h | 3 +- libjava/java/util/Collections.h | 2 + libjava/java/util/LinkedList$1.h | 33 + libjava/java/util/LinkedList.h | 13 + libjava/java/util/Locale.h | 8 + libjava/java/util/Locale.java | 864 --------------------- libjava/java/util/ServiceConfigurationError.h | 23 + libjava/java/util/ServiceLoader$1.h | 28 + libjava/java/util/ServiceLoader.h | 37 + libjava/java/util/TreeMap$1.h | 15 +- libjava/java/util/TreeMap$2.h | 8 +- libjava/java/util/TreeMap$3.h | 5 +- libjava/java/util/TreeMap$4.h | 19 +- libjava/java/util/TreeMap$5.h | 19 +- libjava/java/util/TreeMap$6.h | 13 +- libjava/java/util/TreeMap$7.h | 26 + libjava/java/util/TreeMap$DescendingMap.h | 65 ++ libjava/java/util/TreeMap$DescendingSet.h | 57 ++ libjava/java/util/TreeMap$EntrySet.h | 28 + libjava/java/util/TreeMap$KeySet.h | 29 + libjava/java/util/TreeMap$NavigableEntrySet.h | 55 ++ libjava/java/util/TreeMap$NavigableKeySet.h | 40 + libjava/java/util/TreeMap$SubMap$EntrySet.h | 28 + libjava/java/util/TreeMap$SubMap$KeySet.h | 29 + .../java/util/TreeMap$SubMap$NavigableEntrySet.h | 55 ++ libjava/java/util/TreeMap$SubMap$NavigableKeySet.h | 40 + libjava/java/util/TreeMap$SubMap.h | 20 + libjava/java/util/TreeMap.h | 24 + libjava/java/util/TreeSet.h | 17 +- libjava/java/util/logging/Logger.java | 18 +- libjava/java/util/prefs/Preferences$1.h | 1 + libjava/java/util/regex/Pattern.h | 1 + libjava/java/util/spi/CurrencyNameProvider.h | 21 + libjava/java/util/spi/LocaleNameProvider.h | 23 + libjava/java/util/spi/LocaleServiceProvider.h | 23 + libjava/java/util/spi/TimeZoneNameProvider.h | 21 + 43 files changed, 1140 insertions(+), 920 deletions(-) create mode 100644 libjava/java/util/Collections$LIFOQueue.h create mode 100644 libjava/java/util/Collections$MapSet.h create mode 100644 libjava/java/util/LinkedList$1.h delete mode 100644 libjava/java/util/Locale.java create mode 100644 libjava/java/util/ServiceConfigurationError.h create mode 100644 libjava/java/util/ServiceLoader$1.h create mode 100644 libjava/java/util/ServiceLoader.h create mode 100644 libjava/java/util/TreeMap$7.h create mode 100644 libjava/java/util/TreeMap$DescendingMap.h create mode 100644 libjava/java/util/TreeMap$DescendingSet.h create mode 100644 libjava/java/util/TreeMap$EntrySet.h create mode 100644 libjava/java/util/TreeMap$KeySet.h create mode 100644 libjava/java/util/TreeMap$NavigableEntrySet.h create mode 100644 libjava/java/util/TreeMap$NavigableKeySet.h create mode 100644 libjava/java/util/TreeMap$SubMap$EntrySet.h create mode 100644 libjava/java/util/TreeMap$SubMap$KeySet.h create mode 100644 libjava/java/util/TreeMap$SubMap$NavigableEntrySet.h create mode 100644 libjava/java/util/TreeMap$SubMap$NavigableKeySet.h create mode 100644 libjava/java/util/spi/CurrencyNameProvider.h create mode 100644 libjava/java/util/spi/LocaleNameProvider.h create mode 100644 libjava/java/util/spi/LocaleServiceProvider.h create mode 100644 libjava/java/util/spi/TimeZoneNameProvider.h (limited to 'libjava/java/util') diff --git a/libjava/java/util/AbstractMap$SimpleEntry.h b/libjava/java/util/AbstractMap$SimpleEntry.h index 0cc266d..5812050 100644 --- a/libjava/java/util/AbstractMap$SimpleEntry.h +++ b/libjava/java/util/AbstractMap$SimpleEntry.h @@ -20,6 +20,8 @@ public: virtual jint hashCode(); virtual ::java::lang::Object * setValue(::java::lang::Object *); virtual ::java::lang::String * toString(); +private: + static const jlong serialVersionUID = -8499721149061103585LL; public: // actually package-private ::java::lang::Object * __attribute__((aligned(__alignof__( ::java::lang::Object)))) key; ::java::lang::Object * value; diff --git a/libjava/java/util/AbstractMap$SimpleImmutableEntry.h b/libjava/java/util/AbstractMap$SimpleImmutableEntry.h index 540d5f49..f979f8a 100644 --- a/libjava/java/util/AbstractMap$SimpleImmutableEntry.h +++ b/libjava/java/util/AbstractMap$SimpleImmutableEntry.h @@ -17,6 +17,8 @@ public: virtual ::java::lang::Object * getKey(); virtual ::java::lang::Object * getValue(); virtual ::java::lang::Object * setValue(::java::lang::Object *); +private: + static const jlong serialVersionUID = 7138329143949025153LL; public: // actually package-private ::java::lang::Object * __attribute__((aligned(__alignof__( ::java::lang::Object)))) key; ::java::lang::Object * value; diff --git a/libjava/java/util/Arrays.h b/libjava/java/util/Arrays.h index 6b4941d..4010f60 100644 --- a/libjava/java/util/Arrays.h +++ b/libjava/java/util/Arrays.h @@ -16,14 +16,23 @@ class java::util::Arrays : public ::java::lang::Object Arrays(); public: static jint binarySearch(JArray< jbyte > *, jbyte); + static jint binarySearch(JArray< jbyte > *, jint, jint, jbyte); static jint binarySearch(JArray< jchar > *, jchar); + static jint binarySearch(JArray< jchar > *, jint, jint, jchar); static jint binarySearch(JArray< jshort > *, jshort); + static jint binarySearch(JArray< jshort > *, jint, jint, jshort); static jint binarySearch(JArray< jint > *, jint); + static jint binarySearch(JArray< jint > *, jint, jint, jint); static jint binarySearch(JArray< jlong > *, jlong); + static jint binarySearch(JArray< jlong > *, jint, jint, jlong); static jint binarySearch(JArray< jfloat > *, jfloat); + static jint binarySearch(JArray< jfloat > *, jint, jint, jfloat); static jint binarySearch(JArray< jdouble > *, jdouble); + static jint binarySearch(JArray< jdouble > *, jint, jint, jdouble); static jint binarySearch(JArray< ::java::lang::Object * > *, ::java::lang::Object *); + static jint binarySearch(JArray< ::java::lang::Object * > *, jint, jint, ::java::lang::Object *); static jint binarySearch(JArray< ::java::lang::Object * > *, ::java::lang::Object *, ::java::util::Comparator *); + static jint binarySearch(JArray< ::java::lang::Object * > *, jint, jint, ::java::lang::Object *, ::java::util::Comparator *); static jboolean equals(JArray< jboolean > *, JArray< jboolean > *); static jboolean equals(JArray< jbyte > *, JArray< jbyte > *); static jboolean equals(JArray< jchar > *, JArray< jchar > *); @@ -138,6 +147,26 @@ private: static void deepToString(JArray< ::java::lang::Object * > *, ::java::lang::StringBuilder *, ::java::util::HashSet *); public: static ::java::lang::String * deepToString(JArray< ::java::lang::Object * > *); + static JArray< jboolean > * copyOf(JArray< jboolean > *, jint); + static JArray< jboolean > * copyOfRange(JArray< jboolean > *, jint, jint); + static JArray< jbyte > * copyOf(JArray< jbyte > *, jint); + static JArray< jbyte > * copyOfRange(JArray< jbyte > *, jint, jint); + static JArray< jchar > * copyOf(JArray< jchar > *, jint); + static JArray< jchar > * copyOfRange(JArray< jchar > *, jint, jint); + static JArray< jdouble > * copyOf(JArray< jdouble > *, jint); + static JArray< jdouble > * copyOfRange(JArray< jdouble > *, jint, jint); + static JArray< jfloat > * copyOf(JArray< jfloat > *, jint); + static JArray< jfloat > * copyOfRange(JArray< jfloat > *, jint, jint); + static JArray< jint > * copyOf(JArray< jint > *, jint); + static JArray< jint > * copyOfRange(JArray< jint > *, jint, jint); + static JArray< jlong > * copyOf(JArray< jlong > *, jint); + static JArray< jlong > * copyOfRange(JArray< jlong > *, jint, jint); + static JArray< jshort > * copyOf(JArray< jshort > *, jint); + static JArray< jshort > * copyOfRange(JArray< jshort > *, jint, jint); + static JArray< ::java::lang::Object * > * copyOf(JArray< ::java::lang::Object * > *, jint); + static JArray< ::java::lang::Object * > * copyOfRange(JArray< ::java::lang::Object * > *, jint, jint); + static JArray< ::java::lang::Object * > * copyOf(JArray< ::java::lang::Object * > *, jint, ::java::lang::Class *); + static JArray< ::java::lang::Object * > * copyOfRange(JArray< ::java::lang::Object * > *, jint, jint, ::java::lang::Class *); static ::java::lang::Class class$; }; diff --git a/libjava/java/util/Calendar.h b/libjava/java/util/Calendar.h index 3a46dc0..5d9fb75 100644 --- a/libjava/java/util/Calendar.h +++ b/libjava/java/util/Calendar.h @@ -73,6 +73,8 @@ private: void writeObject(::java::io::ObjectOutputStream *); void readObject(::java::io::ObjectInputStream *); public: + virtual ::java::lang::String * getDisplayName(jint, jint, ::java::util::Locale *); + virtual ::java::util::Map * getDisplayNames(jint, jint, ::java::util::Locale *); virtual jint compareTo(::java::lang::Object *); static const jint ERA = 0; static const jint YEAR = 1; @@ -115,6 +117,9 @@ public: static const jint UNDECIMBER = 12; static const jint AM = 0; static const jint PM = 1; + static const jint ALL_STYLES = 0; + static const jint SHORT = 1; + static const jint LONG = 2; public: // actually protected JArray< jint > * __attribute__((aligned(__alignof__( ::java::lang::Object)))) fields; JArray< jboolean > * isSet__; diff --git a/libjava/java/util/Calendar.java b/libjava/java/util/Calendar.java index 6c0d721..7eab612 100644 --- a/libjava/java/util/Calendar.java +++ b/libjava/java/util/Calendar.java @@ -43,9 +43,12 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; + import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; +import java.text.DateFormatSymbols; + /** * This class is an abstract base class for Calendars, which can be * used to convert between Date objects and a set of @@ -99,6 +102,20 @@ day_of_week + week_of_year * specific field by one, propagating overflows), or * adding/substracting a fixed amount to a field. * + * @author Aaron M. Renn (arenn@urbanophile.com) + * @author Jochen Hoenicke (Jochen.Hoenicke@Informatik.Uni-Oldenburg.de) + * @author Warren Levy (warrenl@cygnus.com) + * @author Jeff Sturm (jsturm@one-point.com) + * @author Tom Tromey (tromey@redhat.com) + * @author Bryce McKinlay (mckinlay@redhat.com) + * @author Ingo Proetel (proetel@aicas.com) + * @author Jerry Quinn (jlquinn@optonline.net) + * @author Jeroen Frijters (jeroen@frijters.net) + * @author Noa Resare (noa@resare.com) + * @author Sven de Marothy (sven@physto.se) + * @author David Gilbert (david.gilbert@object-refinery.com) + * @author Olivier Jolly (olivier.jolly@pcedev.com) + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @see Date * @see GregorianCalendar * @see TimeZone @@ -326,6 +343,34 @@ public abstract class Calendar public static final int PM = 1; /** + * A style specifier for {@link #getDisplayNames(int,int,Locale)} + * stating that names should be returned in both long and short variants. + * + * @since 1.6 + * @see #SHORT + * @see #LONG + */ + public static final int ALL_STYLES = 0; + + /** + * A style specifier for {@link #getDisplayName(int,int,Locale)} + * and {@link #getDisplayNames(int,int,Locale)} stating that names + * should be returned in their short variant if applicable. + * + * @since 1.6 + */ + public static final int SHORT = 1; + + /** + * A style specifier for {@link #getDisplayName(int,int,Locale)} + * and {@link #getDisplayNames(int,int,Locale)} stating that names + * should be returned in their long variant if applicable. + * + * @since 1.6 + */ + public static final int LONG = 2; + + /** * The time fields. The array is indexed by the constants YEAR to * DST_OFFSET. * @serial @@ -504,7 +549,7 @@ public abstract class Calendar * Cache of locale->calendar-class mappings. This avoids having to do a ResourceBundle * lookup for every getInstance call. */ - private static HashMap cache = new HashMap(); + private static HashMap cache = new HashMap(); /** Preset argument types for calendar-class constructor lookup. */ private static Class[] ctorArgTypes = new Class[] @@ -526,7 +571,7 @@ public abstract class Calendar */ public static synchronized Calendar getInstance(TimeZone zone, Locale locale) { - Class calendarClass = (Class) cache.get(locale); + Class calendarClass = cache.get(locale); Throwable exception = null; try @@ -1326,4 +1371,205 @@ public abstract class Calendar areFieldsSet = false; } } + + /** + * Returns a localised textual representation of the current value + * of the given field using the specified style. If there is no + * applicable textual representation (e.g. the field has a numeric + * value), then null is returned. If one does exist, + * then the value is obtained from {@link #get(int)} and converted + * appropriately. For example, if the MONTH field is + * requested, then get(MONTH) is called. This is then + * converted to a textual representation based on its value and + * the style requested; if the LONG style is requested + * and the returned value is 11 from a + * {@link GregorianCalendar} implementation, then "December" + * is returned. By default, a textual representation is available + * for all fields which have an applicable value obtainable from + * {@link java.text.DateFormatSymbols}. + * + * @param field the calendar field whose textual representation should + * be obtained. + * @param style the style to use; either {@link #LONG} or {@link #SHORT}. + * @param locale the locale to use for translation. + * @return the textual representation of the given field in the specified + * style, or null if none is applicable. + * @throws IllegalArgumentException if field or style + * or invalid, or the calendar is non-lenient + * and has invalid values. + * @throws NullPointerException if locale is null. + * @since 1.6 + */ + public String getDisplayName(int field, int style, Locale locale) + { + if (field < 0 || field >= FIELD_COUNT) + throw new IllegalArgumentException("The field value, " + field + + ", is invalid."); + if (style != SHORT && style != LONG) + throw new IllegalArgumentException("The style must be either " + + "short or long."); + if (field == YEAR || field == WEEK_OF_YEAR || + field == WEEK_OF_MONTH || field == DAY_OF_MONTH || + field == DAY_OF_YEAR || field == DAY_OF_WEEK_IN_MONTH || + field == HOUR || field == HOUR_OF_DAY || field == MINUTE || + field == SECOND || field == MILLISECOND) + return null; + + int value = get(field); + DateFormatSymbols syms = DateFormatSymbols.getInstance(locale); + if (field == ERA) + return syms.getEras()[value]; + if (field == MONTH) + if (style == LONG) + return syms.getMonths()[value]; + else + return syms.getShortMonths()[value]; + if (field == DAY_OF_WEEK) + if (style == LONG) + return syms.getWeekdays()[value]; + else + return syms.getShortWeekdays()[value]; + if (field == AM_PM) + return syms.getAmPmStrings()[value]; + if (field == ZONE_OFFSET) + if (style == LONG) + return syms.getZoneStrings()[value][1]; + else + return syms.getZoneStrings()[value][2]; + if (field == DST_OFFSET) + if (style == LONG) + return syms.getZoneStrings()[value][3]; + else + return syms.getZoneStrings()[value][4]; + + throw new InternalError("Failed to resolve field " + field + + " with style " + style + " for locale " + + locale); + } + + /** + * Returns a map linking all specified textual representations + * of the given field to their numerical values. The textual + * representations included are determined by the specified + * style and locale. For example, if the style LONG + * is specified and the German locale, then the map will + * contain "Montag" to {@link #MONDAY}, "Dienstag" to + * {@link #TUESDAY}, "Mittwoch" to {@link #WEDNESDAY} and + * so on. The default implementation uses the values returned + * by {@link DateFormatSymbols} so, for example, the style + * {@link #ALL_STYLES} and the field {@link #MONTH} will return + * a map filled with the values returned from + * {@link DateFormatSymbols#getMonths()} and + * {@link DateFormatSymbols#getShortMonths()}. If there are + * no textual representations for a given field (usually because + * it is purely numeric, such as the year in the + * {@link GregorianCalendar}), null is returned. + * + * @param field the calendar field whose textual representation should + * be obtained. + * @param style the style to use; either {@link #LONG}, {@link #SHORT} + * or {@link ALL_STYLES}. + * @param locale the locale to use for translation. + * @return a map of the textual representations of the given field in the + * specified style to their numeric values, or null + * if none is applicable. + * @throws IllegalArgumentException if field or style + * or invalid, or the calendar is non-lenient + * and has invalid values. + * @throws NullPointerException if locale is null. + * @since 1.6 + */ + public Map getDisplayNames(int field, int style, Locale locale) + { + if (field < 0 || field >= FIELD_COUNT) + throw new IllegalArgumentException("The field value, " + field + + ", is invalid."); + if (style != SHORT && style != LONG && style != ALL_STYLES) + throw new IllegalArgumentException("The style must be either " + + "short, long or all styles."); + if (field == YEAR || field == WEEK_OF_YEAR || + field == WEEK_OF_MONTH || field == DAY_OF_MONTH || + field == DAY_OF_YEAR || field == DAY_OF_WEEK_IN_MONTH || + field == HOUR || field == HOUR_OF_DAY || field == MINUTE || + field == SECOND || field == MILLISECOND) + return null; + + DateFormatSymbols syms = DateFormatSymbols.getInstance(locale); + Map map = new HashMap(); + if (field == ERA) + { + String[] eras = syms.getEras(); + for (int a = 0; a < eras.length; ++a) + map.put(eras[a], a); + return map; + } + if (field == MONTH) + { + if (style == LONG || style == ALL_STYLES) + { + String[] months = syms.getMonths(); + for (int a = 0; a < months.length; ++a) + map.put(months[a], a); + } + if (style == SHORT || style == ALL_STYLES) + { + String[] months = syms.getShortMonths(); + for (int a = 0; a < months.length; ++a) + map.put(months[a], a); + } + return map; + } + if (field == DAY_OF_WEEK) + { + if (style == LONG || style == ALL_STYLES) + { + String[] weekdays = syms.getWeekdays(); + for (int a = SUNDAY; a < weekdays.length; ++a) + map.put(weekdays[a], a); + } + if (style == SHORT || style == ALL_STYLES) + { + String[] weekdays = syms.getShortWeekdays(); + for (int a = SUNDAY; a < weekdays.length; ++a) + map.put(weekdays[a], a); + } + return map; + } + if (field == AM_PM) + { + String[] ampms = syms.getAmPmStrings(); + for (int a = 0; a < ampms.length; ++a) + map.put(ampms[a], a); + return map; + } + if (field == ZONE_OFFSET) + { + String[][] zones = syms.getZoneStrings(); + for (int a = 0; a < zones.length; ++a) + { + if (style == LONG || style == ALL_STYLES) + map.put(zones[a][1], a); + if (style == SHORT || style == ALL_STYLES) + map.put(zones[a][2], a); + } + return map; + } + if (field == DST_OFFSET) + { + String[][] zones = syms.getZoneStrings(); + for (int a = 0; a < zones.length; ++a) + { + if (style == LONG || style == ALL_STYLES) + map.put(zones[a][3], a); + if (style == SHORT || style == ALL_STYLES) + map.put(zones[a][4], a); + } + return map; + } + + throw new InternalError("Failed to resolve field " + field + + " with style " + style + " for locale " + + locale); + } + } diff --git a/libjava/java/util/Collections$LIFOQueue.h b/libjava/java/util/Collections$LIFOQueue.h new file mode 100644 index 0000000..c053a49 --- /dev/null +++ b/libjava/java/util/Collections$LIFOQueue.h @@ -0,0 +1,31 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_Collections$LIFOQueue__ +#define __java_util_Collections$LIFOQueue__ + +#pragma interface + +#include + +class java::util::Collections$LIFOQueue : public ::java::util::AbstractQueue +{ + +public: + Collections$LIFOQueue(::java::util::Deque *); + virtual jboolean add(::java::lang::Object *); + virtual jboolean addAll(::java::util::Collection *); + virtual void clear(); + virtual jboolean isEmpty(); + virtual ::java::util::Iterator * iterator(); + virtual jboolean offer(::java::lang::Object *); + virtual ::java::lang::Object * peek(); + virtual ::java::lang::Object * poll(); + virtual jint size(); +private: + ::java::util::Deque * __attribute__((aligned(__alignof__( ::java::util::AbstractQueue)))) deque; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_Collections$LIFOQueue__ diff --git a/libjava/java/util/Collections$MapSet.h b/libjava/java/util/Collections$MapSet.h new file mode 100644 index 0000000..70caba7 --- /dev/null +++ b/libjava/java/util/Collections$MapSet.h @@ -0,0 +1,30 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_Collections$MapSet__ +#define __java_util_Collections$MapSet__ + +#pragma interface + +#include + +class java::util::Collections$MapSet : public ::java::util::AbstractSet +{ + +public: + Collections$MapSet(::java::util::Map *); + virtual jboolean add(::java::lang::Object *); + virtual jboolean addAll(::java::util::Collection *); + virtual void clear(); + virtual jboolean contains(::java::lang::Object *); + virtual jboolean isEmpty(); + virtual ::java::util::Iterator * iterator(); + virtual jboolean remove(::java::lang::Object *); + virtual jint size(); +private: + ::java::util::Map * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) map; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_Collections$MapSet__ diff --git a/libjava/java/util/Collections$UnmodifiableMap$UnmodifiableEntrySet.h b/libjava/java/util/Collections$UnmodifiableMap$UnmodifiableEntrySet.h index 1128060..8299dc4 100644 --- a/libjava/java/util/Collections$UnmodifiableMap$UnmodifiableEntrySet.h +++ b/libjava/java/util/Collections$UnmodifiableMap$UnmodifiableEntrySet.h @@ -17,9 +17,8 @@ public: // actually package-private Collections$UnmodifiableMap$UnmodifiableEntrySet(::java::util::Set *); public: ::java::util::Iterator * iterator(); - JArray< ::java::util::Map$Entry * > * Collections$UnmodifiableMap$UnmodifiableEntrySet$toArray(); - JArray< ::java::lang::Object * > * toArray(JArray< ::java::lang::Object * > *); JArray< ::java::lang::Object * > * toArray(); + JArray< ::java::lang::Object * > * toArray(JArray< ::java::lang::Object * > *); private: static const jlong serialVersionUID = 7854390611657943733LL; public: diff --git a/libjava/java/util/Collections.h b/libjava/java/util/Collections.h index 6e11724..2ca25f8 100644 --- a/libjava/java/util/Collections.h +++ b/libjava/java/util/Collections.h @@ -69,6 +69,8 @@ public: static ::java::util::Set * checkedSet(::java::util::Set *, ::java::lang::Class *); static ::java::util::SortedMap * checkedSortedMap(::java::util::SortedMap *, ::java::lang::Class *, ::java::lang::Class *); static ::java::util::SortedSet * checkedSortedSet(::java::util::SortedSet *, ::java::lang::Class *); + static ::java::util::Queue * asLifoQueue(::java::util::Deque *); + static ::java::util::Set * newSetFromMap(::java::util::Map *); private: static const jint LARGE_LIST_SIZE = 16; public: diff --git a/libjava/java/util/LinkedList$1.h b/libjava/java/util/LinkedList$1.h new file mode 100644 index 0000000..63c402d --- /dev/null +++ b/libjava/java/util/LinkedList$1.h @@ -0,0 +1,33 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_LinkedList$1__ +#define __java_util_LinkedList$1__ + +#pragma interface + +#include + +class java::util::LinkedList$1 : public ::java::lang::Object +{ + +public: // actually package-private + LinkedList$1(::java::util::LinkedList *); +private: + void checkMod(); +public: + jboolean hasNext(); + ::java::lang::Object * next(); + void remove(); +private: + jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) knownMod; + ::java::util::LinkedList$Entry * next__; + ::java::util::LinkedList$Entry * lastReturned; + jint position; +public: // actually package-private + ::java::util::LinkedList * this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_LinkedList$1__ diff --git a/libjava/java/util/LinkedList.h b/libjava/java/util/LinkedList.h index aee4f09..0c5e681 100644 --- a/libjava/java/util/LinkedList.h +++ b/libjava/java/util/LinkedList.h @@ -56,6 +56,19 @@ public: private: void writeObject(::java::io::ObjectOutputStream *); void readObject(::java::io::ObjectInputStream *); +public: + virtual ::java::util::Iterator * descendingIterator(); + virtual jboolean offerFirst(::java::lang::Object *); + virtual jboolean offerLast(::java::lang::Object *); + virtual ::java::lang::Object * peekFirst(); + virtual ::java::lang::Object * peekLast(); + virtual ::java::lang::Object * pollFirst(); + virtual ::java::lang::Object * pollLast(); + virtual ::java::lang::Object * pop(); + virtual void push(::java::lang::Object *); + virtual jboolean removeFirstOccurrence(::java::lang::Object *); + virtual jboolean removeLastOccurrence(::java::lang::Object *); +private: static const jlong serialVersionUID = 876323262645176354LL; public: // actually package-private ::java::util::LinkedList$Entry * __attribute__((aligned(__alignof__( ::java::util::AbstractSequentialList)))) first; diff --git a/libjava/java/util/Locale.h b/libjava/java/util/Locale.h index 6868aa1..041dab3 100644 --- a/libjava/java/util/Locale.h +++ b/libjava/java/util/Locale.h @@ -26,6 +26,9 @@ public: static JArray< ::java::util::Locale * > * getAvailableLocales(); static JArray< ::java::lang::String * > * getISOCountries(); static JArray< ::java::lang::String * > * getISOLanguages(); +private: + static JArray< ::java::lang::String * > * getISOStrings(::java::lang::String *); +public: ::java::lang::String * getLanguage(); ::java::lang::String * getCountry(); ::java::lang::String * getVariant(); @@ -68,13 +71,18 @@ public: static ::java::util::Locale * US; static ::java::util::Locale * CANADA; static ::java::util::Locale * CANADA_FRENCH; + static ::java::util::Locale * ROOT; private: static const jlong serialVersionUID = 9149081749638150636LL; ::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) language; ::java::lang::String * country; ::java::lang::String * variant; jint hashcode; + static JArray< ::java::util::Locale * > * availableLocales; + static ::java::util::HashMap * localeMap; static ::java::util::Locale * defaultLocale; + static JArray< ::java::lang::String * > * languageCache; + static JArray< ::java::lang::String * > * countryCache; public: static ::java::lang::Class class$; }; diff --git a/libjava/java/util/Locale.java b/libjava/java/util/Locale.java deleted file mode 100644 index 03689aa..0000000 --- a/libjava/java/util/Locale.java +++ /dev/null @@ -1,864 +0,0 @@ -/* Locale.java -- i18n locales - Copyright (C) 1998, 1999, 2001, 2002, 2005, 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package java.util; - -import gnu.classpath.SystemProperties; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; - -/** - * Locales represent a specific country and culture. Classes which can be - * passed a Locale object tailor their information for a given locale. For - * instance, currency number formatting is handled differently for the USA - * and France. - * - *

Locales are made up of a language code, a country code, and an optional - * set of variant strings. Language codes are represented by - * - * ISO 639:1988 w/ additions from ISO 639/RA Newsletter No. 1/1989 - * and a decision of the Advisory Committee of ISO/TC39 on August 8, 1997. - * - *

Country codes are represented by - * - * ISO 3166. Variant strings are vendor and browser specific. Standard - * variant strings include "POSIX" for POSIX, "WIN" for MS-Windows, and - * "MAC" for Macintosh. When there is more than one variant string, they must - * be separated by an underscore (U+005F). - * - *

The default locale is determined by the values of the system properties - * user.language, user.region, and user.variant, defaulting to "en". Note that - * the locale does NOT contain the conversion and formatting capabilities (for - * that, use ResourceBundle and java.text). Rather, it is an immutable tag - * object for identifying a given locale, which is referenced by these other - * classes when they must make locale-dependent decisions. - * - * @see ResourceBundle - * @see java.text.Format - * @see java.text.NumberFormat - * @see java.text.Collator - * @author Jochen Hoenicke - * @author Paul Fisher - * @author Eric Blake (ebb9@email.byu.edu) - * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.1 - * @status updated to 1.4 - */ -public final class Locale implements Serializable, Cloneable -{ - /** Locale which represents the English language. */ - public static final Locale ENGLISH = getLocale("en"); - - /** Locale which represents the French language. */ - public static final Locale FRENCH = getLocale("fr"); - - /** Locale which represents the German language. */ - public static final Locale GERMAN = getLocale("de"); - - /** Locale which represents the Italian language. */ - public static final Locale ITALIAN = getLocale("it"); - - /** Locale which represents the Japanese language. */ - public static final Locale JAPANESE = getLocale("ja"); - - /** Locale which represents the Korean language. */ - public static final Locale KOREAN = getLocale("ko"); - - /** Locale which represents the Chinese language. */ - public static final Locale CHINESE = getLocale("zh"); - - /** Locale which represents the Chinese language as used in China. */ - public static final Locale SIMPLIFIED_CHINESE = getLocale("zh", "CN"); - - /** - * Locale which represents the Chinese language as used in Taiwan. - * Same as TAIWAN Locale. - */ - public static final Locale TRADITIONAL_CHINESE = getLocale("zh", "TW"); - - /** Locale which represents France. */ - public static final Locale FRANCE = getLocale("fr", "FR"); - - /** Locale which represents Germany. */ - public static final Locale GERMANY = getLocale("de", "DE"); - - /** Locale which represents Italy. */ - public static final Locale ITALY = getLocale("it", "IT"); - - /** Locale which represents Japan. */ - public static final Locale JAPAN = getLocale("ja", "JP"); - - /** Locale which represents Korea. */ - public static final Locale KOREA = getLocale("ko", "KR"); - - /** - * Locale which represents China. - * Same as SIMPLIFIED_CHINESE Locale. - */ - public static final Locale CHINA = SIMPLIFIED_CHINESE; - - /** - * Locale which represents the People's Republic of China. - * Same as CHINA Locale. - */ - public static final Locale PRC = CHINA; - - /** - * Locale which represents Taiwan. - * Same as TRADITIONAL_CHINESE Locale. - */ - public static final Locale TAIWAN = TRADITIONAL_CHINESE; - - /** Locale which represents the United Kingdom. */ - public static final Locale UK = getLocale("en", "GB"); - - /** Locale which represents the United States. */ - public static final Locale US = getLocale("en", "US"); - - /** Locale which represents the English speaking portion of Canada. */ - public static final Locale CANADA = getLocale("en", "CA"); - - /** Locale which represents the French speaking portion of Canada. */ - public static final Locale CANADA_FRENCH = getLocale("fr", "CA"); - - /** - * Compatible with JDK 1.1+. - */ - private static final long serialVersionUID = 9149081749638150636L; - - /** - * The language code, as returned by getLanguage(). - * - * @serial the languange, possibly "" - */ - private String language; - - /** - * The country code, as returned by getCountry(). - * - * @serial the country, possibly "" - */ - private String country; - - /** - * The variant code, as returned by getVariant(). - * - * @serial the variant, possibly "" - */ - private String variant; - - /** - * This is the cached hashcode. When writing to stream, we write -1. - * - * @serial should be -1 in serial streams - */ - private int hashcode; - - /** - * The default locale. Except for during bootstrapping, this should never be - * null. Note the logic in the main constructor, to detect when - * bootstrapping has completed. - */ - private static Locale defaultLocale = - getLocale(SystemProperties.getProperty("user.language", "en"), - SystemProperties.getProperty("user.region", ""), - SystemProperties.getProperty("user.variant", "")); - - /** - * Retrieves the locale with the specified language from the cache. - * - * @param language the language of the locale to retrieve. - * @return the locale. - */ - private static Locale getLocale(String language) - { - return getLocale(language, "", ""); - } - - /** - * Retrieves the locale with the specified language and region - * from the cache. - * - * @param language the language of the locale to retrieve. - * @param region the region of the locale to retrieve. - * @return the locale. - */ - private static Locale getLocale(String language, String region) - { - return getLocale(language, region, ""); - } - - /** - * Retrieves the locale with the specified language, region - * and variant from the cache. - * - * @param language the language of the locale to retrieve. - * @param region the region of the locale to retrieve. - * @param variant the variant of the locale to retrieve. - * @return the locale. - */ - private static Locale getLocale(String language, String region, String variant) - { - return new Locale(language, region, variant); - } - - /** - * Convert new iso639 codes to the old ones. - * - * @param language the language to check - * @return the appropriate code - */ - private String convertLanguage(String language) - { - if (language.equals("")) - return language; - language = language.toLowerCase(); - int index = "he,id,yi".indexOf(language); - if (index != -1) - return "iw,in,ji".substring(index, index + 2); - return language; - } - - /** - * Creates a new locale for the given language and country. - * - * @param language lowercase two-letter ISO-639 A2 language code - * @param country uppercase two-letter ISO-3166 A2 contry code - * @param variant vendor and browser specific - * @throws NullPointerException if any argument is null - */ - public Locale(String language, String country, String variant) - { - // During bootstrap, we already know the strings being passed in are - // the correct capitalization, and not null. We can't call - // String.toUpperCase during this time, since that depends on the - // default locale. - if (defaultLocale != null) - { - language = convertLanguage(language).intern(); - country = country.toUpperCase().intern(); - variant = variant.intern(); - } - this.language = language; - this.country = country; - this.variant = variant; - hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode(); - } - - /** - * Creates a new locale for the given language and country. - * - * @param language lowercase two-letter ISO-639 A2 language code - * @param country uppercase two-letter ISO-3166 A2 country code - * @throws NullPointerException if either argument is null - */ - public Locale(String language, String country) - { - this(language, country, ""); - } - - /** - * Creates a new locale for a language. - * - * @param language lowercase two-letter ISO-639 A2 language code - * @throws NullPointerException if either argument is null - * @since 1.4 - */ - public Locale(String language) - { - this(language, "", ""); - } - - /** - * Returns the default Locale. The default locale is generally once set - * on start up and then never changed. Normally you should use this locale - * for everywhere you need a locale. The initial setting matches the - * default locale, the user has chosen. - * - * @return the default locale for this virtual machine - */ - public static Locale getDefault() - { - return defaultLocale; - } - - /** - * Changes the default locale. Normally only called on program start up. - * Note that this doesn't change the locale for other programs. This has - * a security check, - * PropertyPermission("user.language", "write"), because of - * its potential impact to running code. - * - * @param newLocale the new default locale - * @throws NullPointerException if newLocale is null - * @throws SecurityException if permission is denied - */ - public static void setDefault(Locale newLocale) - { - if (newLocale == null) - throw new NullPointerException(); - SecurityManager sm = System.getSecurityManager(); - if (sm != null) - sm.checkPermission(new PropertyPermission("user.language", "write")); - defaultLocale = newLocale; - } - - /** - * Returns the list of available locales. - * - * @return the installed locales - */ - public static Locale[] getAvailableLocales() - { - /* I only return those for which localized language - * or country information exists. - * XXX - remove hard coded list, and implement more locales (Sun's JDK 1.4 - * has 148 installed locales!). - */ - return new Locale[] - { - ENGLISH, FRENCH, GERMAN, new Locale("ga", "") - }; - } - - /** - * Returns a list of all 2-letter uppercase country codes as defined - * in ISO 3166. - * - * @return a list of acceptable country codes - */ - public static String[] getISOCountries() - { - return new String[] - { - "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO", "AQ", "AR", "AS", - "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", - "BJ", "BM", "BN", "BO", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", - "CC", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", - "CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", - "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "FX", - "GA", "GB", "GD", "GE", "GF", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", - "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", - "ID", "IE", "IL", "IN", "IO", "IQ", "IR", "IS", "IT", "JM", "JO", "JP", - "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", - "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", - "MD", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", - "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", - "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", - "PH", "PK", "PL", "PM", "PN", "PR", "PT", "PW", "PY", "QA", "RE", "RO", - "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", - "SL", "SM", "SN", "SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", - "TG", "TH", "TJ", "TK", "TM", "TN", "TO", "TP", "TR", "TT", "TV", "TW", - "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", - "VN", "VU", "WF", "WS", "YE", "YT", "YU", "ZA", "ZM", "ZR", "ZW" - }; - } - - /** - * Returns a list of all 2-letter lowercase language codes as defined - * in ISO 639 (both old and new variant). - * - * @return a list of acceptable language codes - */ - public static String[] getISOLanguages() - { - return new String[] - { - "aa", "ab", "af", "am", "ar", "as", "ay", "az", "ba", "be", "bg", "bh", - "bi", "bn", "bo", "br", "ca", "co", "cs", "cy", "da", "de", "dz", "el", - "en", "eo", "es", "et", "eu", "fa", "fi", "fj", "fo", "fr", "fy", "ga", - "gd", "gl", "gn", "gu", "ha", "he", "hi", "hr", "hu", "hy", "ia", "id", - "ie", "ik", "in", "is", "it", "iu", "iw", "ja", "ji", "jw", "ka", "kk", - "kl", "km", "kn", "ko", "ks", "ku", "ky", "la", "ln", "lo", "lt", "lv", - "mg", "mi", "mk", "ml", "mn", "mo", "mr", "ms", "mt", "my", "na", "ne", - "nl", "no", "oc", "om", "or", "pa", "pl", "ps", "pt", "qu", "rm", "rn", - "ro", "ru", "rw", "sa", "sd", "sg", "sh", "si", "sk", "sl", "sm", "sn", - "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", - "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ug", "uk", "ur", - "uz", "vi", "vo", "wo", "xh", "yi", "yo", "za", "zh", "zu" - }; - } - - /** - * Returns the language code of this locale. Some language codes have changed - * as ISO 639 has evolved; this returns the old name, even if you built - * the locale with the new one. - * - * @return language code portion of this locale, or an empty String - */ - public String getLanguage() - { - return language; - } - - /** - * Returns the country code of this locale. - * - * @return country code portion of this locale, or an empty String - */ - public String getCountry() - { - return country; - } - - /** - * Returns the variant code of this locale. - * - * @return the variant code portion of this locale, or an empty String - */ - public String getVariant() - { - return variant; - } - - /** - * Gets the string representation of the current locale. This consists of - * the language, the country, and the variant, separated by an underscore. - * The variant is listed only if there is a language or country. Examples: - * "en", "de_DE", "_GB", "en_US_WIN", "de__POSIX", "fr__MAC". - * - * @return the string representation of this Locale - * @see #getDisplayName() - */ - public String toString() - { - if (language.length() == 0 && country.length() == 0) - return ""; - else if (country.length() == 0 && variant.length() == 0) - return language; - StringBuffer result = new StringBuffer(language); - result.append('_').append(country); - if (variant.length() != 0) - result.append('_').append(variant); - return result.toString(); - } - - /** - * Returns the three-letter ISO language abbrevation of this locale. - * - * @throws MissingResourceException if the three-letter code is not known - */ - public String getISO3Language() - { - // We know all strings are interned so we can use '==' for better performance. - if (language == "") - return ""; - int index - = ("aa,ab,af,am,ar,as,ay,az,ba,be,bg,bh,bi,bn,bo,br,ca,co,cs,cy,da," - + "de,dz,el,en,eo,es,et,eu,fa,fi,fj,fo,fr,fy,ga,gd,gl,gn,gu,ha,iw," - + "hi,hr,hu,hy,ia,in,ie,ik,in,is,it,iu,iw,ja,ji,jw,ka,kk,kl,km,kn," - + "ko,ks,ku,ky,la,ln,lo,lt,lv,mg,mi,mk,ml,mn,mo,mr,ms,mt,my,na,ne," - + "nl,no,oc,om,or,pa,pl,ps,pt,qu,rm,rn,ro,ru,rw,sa,sd,sg,sh,si,sk," - + "sl,sm,sn,so,sq,sr,ss,st,su,sv,sw,ta,te,tg,th,ti,tk,tl,tn,to,tr," - + "ts,tt,tw,ug,uk,ur,uz,vi,vo,wo,xh,ji,yo,za,zh,zu") - .indexOf(language); - - if (index % 3 != 0 || language.length() != 2) - throw new MissingResourceException - ("Can't find ISO3 language for " + language, - "java.util.Locale", language); - - // Don't read this aloud. These are the three letter language codes. - return - ("aarabkaframharaasmaymazebakbelbulbihbisbenbodbrecatcoscescymdandeu" - + "dzoellengepospaesteusfasfinfijfaofrafrygaigdhglggrngujhauhebhinhrv" - + "hunhyeinaindileipkindislitaikuhebjpnyidjawkatkazkalkhmkankorkaskur" - + "kirlatlinlaolitlavmlgmrimkdmalmonmolmarmsamltmyanaunepnldnorociorm" - + "oripanpolpusporquerohrunronruskinsansndsagsrpsinslkslvsmosnasomsqi" - + "srpsswsotsunsweswatamteltgkthatirtuktgltsntonturtsotattwiuigukrurd" - + "uzbvievolwolxhoyidyorzhazhozul") - .substring(index, index + 3); - } - - /** - * Returns the three-letter ISO country abbrevation of the locale. - * - * @throws MissingResourceException if the three-letter code is not known - */ - public String getISO3Country() - { - // We know all strings are interned so we can use '==' for better performance. - if (country == "") - return ""; - int index - = ("AD,AE,AF,AG,AI,AL,AM,AN,AO,AQ,AR,AS,AT,AU,AW,AZ,BA,BB,BD,BE,BF," - + "BG,BH,BI,BJ,BM,BN,BO,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CF,CG,CH,CI,CK," - + "CL,CM,CN,CO,CR,CU,CV,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER," - + "ES,ET,FI,FJ,FK,FM,FO,FR,FX,GA,GB,GD,GE,GF,GH,GI,GL,GM,GN,GP,GQ," - + "GR,GS,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IN,IO,IQ,IR,IS,IT," - + "JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS," - + "LT,LU,LV,LY,MA,MC,MD,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV," - + "MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG," - + "PH,PK,PL,PM,PN,PR,PT,PW,PY,QA,RE,RO,RU,RW,SA,SB,SC,SD,SE,SG,SH," - + "SI,SJ,SK,SL,SM,SN,SO,SR,ST,SV,SY,SZ,TC,TD,TF,TG,TH,TJ,TK,TM,TN," - + "TO,TP,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF," - + "WS,YE,YT,YU,ZA,ZM,ZR,ZW") - .indexOf(country); - - if (index % 3 != 0 || country.length() != 2) - throw new MissingResourceException - ("Can't find ISO3 country for " + country, - "java.util.Locale", country); - - // Don't read this aloud. These are the three letter country codes. - return - ("ANDAREAFGATGAIAALBARMANTAGOATAARGASMAUTAUSABWAZEBIHBRBBGDBELBFABGR" - + "BHRBDIBENBMUBRNBOLBRABHSBTNBVTBWABLRBLZCANCCKCAFCOGCHECIVCOKCHLCMR" - + "CHNCOLCRICUBCPVCXRCYPCZEDEUDJIDNKDMADOMDZAECUESTEGYESHERIESPETHFIN" - + "FJIFLKFSMFROFRAFXXGABGBRGRDGEOGUFGHAGIBGRLGMBGINGLPGNQGRCSGSGTMGUM" - + "GNBGUYHKGHMDHNDHRVHTIHUNIDNIRLISRINDIOTIRQIRNISLITAJAMJORJPNKENKGZ" - + "KHMKIRCOMKNAPRKKORKWTCYMKAZLAOLBNLCALIELKALBRLSOLTULUXLVALBYMARMCO" - + "MDAMDGMHLMKDMLIMMRMNGMACMNPMTQMRTMSRMLTMUSMDVMWIMEXMYSMOZNAMNCLNER" - + "NFKNGANICNLDNORNPLNRUNIUNZLOMNPANPERPYFPNGPHLPAKPOLSPMPCNPRIPRTPLW" - + "PRYQATREUROMRUSRWASAUSLBSYCSDNSWESGPSHNSVNSJMSVKSLESMRSENSOMSURSTP" - + "SLVSYRSWZTCATCDATFTGOTHATJKTKLTKMTUNTONTMPTURTTOTUVTWNTZAUKRUGAUMI" - + "USAURYUZBVATVCTVENVGBVIRVNMVUTWLFWSMYEMMYTYUGZAFZMBZARZWE") - .substring(index, index + 3); - } - - /** - * Gets the country name suitable for display to the user, formatted - * for the default locale. This has the same effect as - *

-   * getDisplayLanguage(Locale.getDefault());
-   * 
- * - * @return the language name of this locale localized to the default locale, - * with the ISO code as backup - */ - public String getDisplayLanguage() - { - return getDisplayLanguage(defaultLocale); - } - - /** - *

- * Gets the name of the language specified by this locale, in a form suitable - * for display to the user. If possible, the display name will be localized - * to the specified locale. For example, if the locale instance is - * Locale.GERMANY, and the specified locale is Locale.UK, - * the result would be 'German'. Using the German locale would instead give - * 'Deutsch'. If the display name can not be localized to the supplied - * locale, it will fall back on other output in the following order: - *

- *
    - *
  • the display name in the default locale
  • - *
  • the display name in English
  • - *
  • the ISO code
  • - *
- *

- * If the language is unspecified by this locale, then the empty string is - * returned. - *

- * - * @param inLocale the locale to use for formatting the display string. - * @return the language name of this locale localized to the given locale, - * with the default locale, English and the ISO code as backups. - * @throws NullPointerException if the supplied locale is null. - */ - public String getDisplayLanguage(Locale inLocale) - { - try - { - ResourceBundle bundle - = ResourceBundle.getBundle("gnu.java.locale.iso639", inLocale); - return bundle.getString(language); - } - catch (MissingResourceException ex) - { - return language; - } - } - - /** - * Returns the country name of this locale localized to the - * default locale. If the localized is not found, the ISO code - * is returned. This has the same effect as - *
-   * getDisplayCountry(Locale.getDefault());
-   * 
- * - * @return the country name of this locale localized to the given locale, - * with the ISO code as backup - */ - public String getDisplayCountry() - { - return getDisplayCountry(defaultLocale); - } - - /** - *

- * Gets the name of the country specified by this locale, in a form suitable - * for display to the user. If possible, the display name will be localized - * to the specified locale. For example, if the locale instance is - * Locale.GERMANY, and the specified locale is Locale.UK, - * the result would be 'Germany'. Using the German locale would instead give - * 'Deutschland'. If the display name can not be localized to the supplied - * locale, it will fall back on other output in the following order: - *

- *
    - *
  • the display name in the default locale
  • - *
  • the display name in English
  • - *
  • the ISO code
  • - *
- *

- * If the country is unspecified by this locale, then the empty string is - * returned. - *

- * - * @param inLocale the locale to use for formatting the display string. - * @return the country name of this locale localized to the given locale, - * with the default locale, English and the ISO code as backups. - * @throws NullPointerException if the supplied locale is null. - */ - public String getDisplayCountry(Locale inLocale) - { - try - { - ResourceBundle bundle = - ResourceBundle.getBundle("gnu.java.locale.iso3166", inLocale); - return bundle.getString(country); - } - catch (MissingResourceException ex) - { - return country; - } - } - - /** - * Returns the variant name of this locale localized to the - * default locale. If the localized is not found, the variant code - * itself is returned. This has the same effect as - *
-   * getDisplayVariant(Locale.getDefault());
-   * 
- * - * @return the variant code of this locale localized to the given locale, - * with the ISO code as backup - */ - public String getDisplayVariant() - { - return getDisplayVariant(defaultLocale); - } - - /** - *

- * Gets the name of the variant specified by this locale, in a form suitable - * for display to the user. If possible, the display name will be localized - * to the specified locale. For example, if the locale instance is a revised - * variant, and the specified locale is Locale.UK, the result - * would be 'REVISED'. Using the German locale would instead give - * 'Revidiert'. If the display name can not be localized to the supplied - * locale, it will fall back on other output in the following order: - *

- *
    - *
  • the display name in the default locale
  • - *
  • the display name in English
  • - *
  • the ISO code
  • - *
- *

- * If the variant is unspecified by this locale, then the empty string is - * returned. - *

- * - * @param inLocale the locale to use for formatting the display string. - * @return the variant name of this locale localized to the given locale, - * with the default locale, English and the ISO code as backups. - * @throws NullPointerException if the supplied locale is null. - */ - public String getDisplayVariant(Locale inLocale) - { - // XXX - load a bundle? - return variant; - } - - /** - * Gets all local components suitable for display to the user, formatted - * for the default locale. For the language component, getDisplayLanguage - * is called. For the country component, getDisplayCountry is called. - * For the variant set component, getDisplayVariant is called. - * - *

The returned String will be one of the following forms:
- *

-   * language (country, variant)
-   * language (country)
-   * language (variant)
-   * country (variant)
-   * language
-   * country
-   * variant
-   * 
- * - * @return String version of this locale, suitable for display to the user - */ - public String getDisplayName() - { - return getDisplayName(defaultLocale); - } - - /** - * Gets all local components suitable for display to the user, formatted - * for a specified locale. For the language component, - * getDisplayLanguage(Locale) is called. For the country component, - * getDisplayCountry(Locale) is called. For the variant set component, - * getDisplayVariant(Locale) is called. - * - *

The returned String will be one of the following forms:
- *

-   * language (country, variant)
-   * language (country)
-   * language (variant)
-   * country (variant)
-   * language
-   * country
-   * variant
-   * 
- * - * @param locale locale to use for formatting - * @return String version of this locale, suitable for display to the user - */ - public String getDisplayName(Locale locale) - { - StringBuffer result = new StringBuffer(); - int count = 0; - String[] delimiters = {"", " (", ","}; - if (language.length() != 0) - { - result.append(delimiters[count++]); - result.append(getDisplayLanguage(locale)); - } - if (country.length() != 0) - { - result.append(delimiters[count++]); - result.append(getDisplayCountry(locale)); - } - if (variant.length() != 0) - { - result.append(delimiters[count++]); - result.append(getDisplayVariant(locale)); - } - if (count > 1) - result.append(")"); - return result.toString(); - } - - /** - * Does the same as Object.clone() but does not throw - * a CloneNotSupportedException. Why anyone would - * use this method is a secret to me, since this class is immutable. - * - * @return the clone - */ - public Object clone() - { - // This class is final, so no need to use native super.clone(). - return new Locale(language, country, variant); - } - - /** - * Return the hash code for this locale. The hashcode is the logical - * xor of the hash codes of the language, the country and the variant. - * The hash code is precomputed, since Locales are often - * used in hash tables. - * - * @return the hashcode - */ - public int hashCode() - { - return hashcode; - } - - /** - * Compares two locales. To be equal, obj must be a Locale with the same - * language, country, and variant code. - * - * @param obj the other locale - * @return true if obj is equal to this - */ - public boolean equals(Object obj) - { - if (this == obj) - return true; - if (! (obj instanceof Locale)) - return false; - Locale l = (Locale) obj; - - return (language == l.language - && country == l.country - && variant == l.variant); - } - - /** - * Write the locale to an object stream. - * - * @param output the stream to write to - * @throws IOException if the write fails - * @serialData The first three fields are Strings representing language, - * country, and variant. The fourth field is a placeholder for - * the cached hashcode, but this is always written as -1, and - * recomputed when reading it back. - */ - private void writeObject(ObjectOutputStream s) - throws IOException - { - ObjectOutputStream.PutField fields = s.putFields(); - fields.put("hashcode", -1); - s.defaultWriteObject(); - } - - /** - * Reads a locale from the input stream. - * - * @param input the stream to read from - * @throws IOException if reading fails - * @throws ClassNotFoundException if reading fails - * @serialData the hashCode is always invalid and must be recomputed - */ - private void readObject(ObjectInputStream s) - throws IOException, ClassNotFoundException - { - s.defaultReadObject(); - language = language.intern(); - country = country.intern(); - variant = variant.intern(); - hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode(); - } -} // class Locale diff --git a/libjava/java/util/ServiceConfigurationError.h b/libjava/java/util/ServiceConfigurationError.h new file mode 100644 index 0000000..7a2a905 --- /dev/null +++ b/libjava/java/util/ServiceConfigurationError.h @@ -0,0 +1,23 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_ServiceConfigurationError__ +#define __java_util_ServiceConfigurationError__ + +#pragma interface + +#include + +class java::util::ServiceConfigurationError : public ::java::lang::Error +{ + +public: + ServiceConfigurationError(::java::lang::String *); + ServiceConfigurationError(::java::lang::String *, ::java::lang::Throwable *); +private: + static const jlong serialVersionUID = 74132770414881LL; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_ServiceConfigurationError__ diff --git a/libjava/java/util/ServiceLoader$1.h b/libjava/java/util/ServiceLoader$1.h new file mode 100644 index 0000000..ad210a2 --- /dev/null +++ b/libjava/java/util/ServiceLoader$1.h @@ -0,0 +1,28 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_ServiceLoader$1__ +#define __java_util_ServiceLoader$1__ + +#pragma interface + +#include + +class java::util::ServiceLoader$1 : public ::java::lang::Object +{ + +public: // actually package-private + ServiceLoader$1(::java::util::ServiceLoader *); +public: + jboolean hasNext(); + ::java::lang::Object * next(); + void remove(); +private: + ::java::util::Iterator * __attribute__((aligned(__alignof__( ::java::lang::Object)))) cacheIt; +public: // actually package-private + ::java::util::ServiceLoader * this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_ServiceLoader$1__ diff --git a/libjava/java/util/ServiceLoader.h b/libjava/java/util/ServiceLoader.h new file mode 100644 index 0000000..f3a9160 --- /dev/null +++ b/libjava/java/util/ServiceLoader.h @@ -0,0 +1,37 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_ServiceLoader__ +#define __java_util_ServiceLoader__ + +#pragma interface + +#include + +class java::util::ServiceLoader : public ::java::lang::Object +{ + + ServiceLoader(::java::lang::Class *, ::java::lang::ClassLoader *); +public: + ::java::util::Iterator * iterator(); + static ::java::util::ServiceLoader * load(::java::lang::Class *); + static ::java::util::ServiceLoader * load(::java::lang::Class *, ::java::lang::ClassLoader *); + static ::java::util::ServiceLoader * loadInstalled(::java::lang::Class *); + void reload(); + ::java::lang::String * toString(); +public: // actually package-private + static ::java::util::List * access$0(::java::util::ServiceLoader *); + static ::java::util::Iterator * access$1(::java::util::ServiceLoader *); + static ::java::lang::Class * access$2(::java::util::ServiceLoader *); + static ::java::lang::ClassLoader * access$3(::java::util::ServiceLoader *); + static void access$4(::java::util::ServiceLoader *, ::java::util::Iterator *); +private: + ::java::lang::Class * __attribute__((aligned(__alignof__( ::java::lang::Object)))) spi; + ::java::lang::ClassLoader * loader; + ::java::util::List * cache; + ::java::util::Iterator * serviceIt; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_ServiceLoader__ diff --git a/libjava/java/util/TreeMap$1.h b/libjava/java/util/TreeMap$1.h index d181072..59653e3 100644 --- a/libjava/java/util/TreeMap$1.h +++ b/libjava/java/util/TreeMap$1.h @@ -6,21 +6,18 @@ #pragma interface -#include +#include -class java::util::TreeMap$1 : public ::java::util::AbstractSet +class java::util::TreeMap$1 : public ::java::lang::Object { public: // actually package-private - TreeMap$1(::java::util::TreeMap$SubMap *); + TreeMap$1(::java::util::TreeMap$SubMap$NavigableEntrySet *); public: - jint size(); - ::java::util::Iterator * iterator(); - void clear(); - jboolean contains(::java::lang::Object *); - jboolean remove(::java::lang::Object *); + jint TreeMap$1$compare(::java::util::Map$Entry *, ::java::util::Map$Entry *); + jint compare(::java::lang::Object *, ::java::lang::Object *); public: // actually package-private - ::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$1; + ::java::util::TreeMap$SubMap$NavigableEntrySet * __attribute__((aligned(__alignof__( ::java::lang::Object)))) this$2; public: static ::java::lang::Class class$; }; diff --git a/libjava/java/util/TreeMap$2.h b/libjava/java/util/TreeMap$2.h index 0ea21a8..92b9f40 100644 --- a/libjava/java/util/TreeMap$2.h +++ b/libjava/java/util/TreeMap$2.h @@ -6,9 +6,9 @@ #pragma interface -#include +#include -class java::util::TreeMap$2 : public ::java::util::AbstractSet +class java::util::TreeMap$2 : public ::java::util::AbstractCollection { public: // actually package-private @@ -17,10 +17,8 @@ public: jint size(); ::java::util::Iterator * iterator(); void clear(); - jboolean contains(::java::lang::Object *); - jboolean remove(::java::lang::Object *); public: // actually package-private - ::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$1; + ::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractCollection)))) this$1; public: static ::java::lang::Class class$; }; diff --git a/libjava/java/util/TreeMap$3.h b/libjava/java/util/TreeMap$3.h index 47ece2a..3ab5a98 100644 --- a/libjava/java/util/TreeMap$3.h +++ b/libjava/java/util/TreeMap$3.h @@ -12,13 +12,14 @@ class java::util::TreeMap$3 : public ::java::util::AbstractCollection { public: // actually package-private - TreeMap$3(::java::util::TreeMap$SubMap *); + TreeMap$3(::java::util::TreeMap$DescendingMap *); public: jint size(); ::java::util::Iterator * iterator(); void clear(); public: // actually package-private - ::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractCollection)))) this$1; + static ::java::util::TreeMap$DescendingMap * access$0(::java::util::TreeMap$3 *); + ::java::util::TreeMap$DescendingMap * __attribute__((aligned(__alignof__( ::java::util::AbstractCollection)))) this$1; public: static ::java::lang::Class class$; }; diff --git a/libjava/java/util/TreeMap$4.h b/libjava/java/util/TreeMap$4.h index 5665ffd..b8e5ba7 100644 --- a/libjava/java/util/TreeMap$4.h +++ b/libjava/java/util/TreeMap$4.h @@ -6,21 +6,22 @@ #pragma interface -#include +#include -class java::util::TreeMap$4 : public ::java::util::AbstractSet +class java::util::TreeMap$4 : public ::java::lang::Object { public: // actually package-private - TreeMap$4(::java::util::TreeMap *); + TreeMap$4(::java::util::TreeMap$3 *); public: - jint size(); - ::java::util::Iterator * iterator(); - void clear(); - jboolean contains(::java::lang::Object *); - jboolean remove(::java::lang::Object *); + jboolean hasNext(); + ::java::lang::Object * next(); + void remove(); +private: + ::java::util::Map$Entry * __attribute__((aligned(__alignof__( ::java::lang::Object)))) last; + ::java::util::Map$Entry * next__; public: // actually package-private - ::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$0; + ::java::util::TreeMap$3 * this$2; public: static ::java::lang::Class class$; }; diff --git a/libjava/java/util/TreeMap$5.h b/libjava/java/util/TreeMap$5.h index b615001..585fe2c 100644 --- a/libjava/java/util/TreeMap$5.h +++ b/libjava/java/util/TreeMap$5.h @@ -6,21 +6,22 @@ #pragma interface -#include +#include -class java::util::TreeMap$5 : public ::java::util::AbstractSet +class java::util::TreeMap$5 : public ::java::lang::Object { public: // actually package-private - TreeMap$5(::java::util::TreeMap *); + TreeMap$5(::java::util::TreeMap$DescendingSet *); public: - jint size(); - ::java::util::Iterator * iterator(); - void clear(); - jboolean contains(::java::lang::Object *); - jboolean remove(::java::lang::Object *); + jboolean hasNext(); + ::java::lang::Object * next(); + void remove(); +private: + ::java::lang::Object * __attribute__((aligned(__alignof__( ::java::lang::Object)))) last; + ::java::lang::Object * next__; public: // actually package-private - ::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$0; + ::java::util::TreeMap$DescendingSet * this$1; public: static ::java::lang::Class class$; }; diff --git a/libjava/java/util/TreeMap$6.h b/libjava/java/util/TreeMap$6.h index 45e7802..0e8af45 100644 --- a/libjava/java/util/TreeMap$6.h +++ b/libjava/java/util/TreeMap$6.h @@ -6,19 +6,18 @@ #pragma interface -#include +#include -class java::util::TreeMap$6 : public ::java::util::AbstractCollection +class java::util::TreeMap$6 : public ::java::lang::Object { public: // actually package-private - TreeMap$6(::java::util::TreeMap *); + TreeMap$6(::java::util::TreeMap$NavigableEntrySet *); public: - jint size(); - ::java::util::Iterator * iterator(); - void clear(); + jint TreeMap$6$compare(::java::util::Map$Entry *, ::java::util::Map$Entry *); + jint compare(::java::lang::Object *, ::java::lang::Object *); public: // actually package-private - ::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractCollection)))) this$0; + ::java::util::TreeMap$NavigableEntrySet * __attribute__((aligned(__alignof__( ::java::lang::Object)))) this$1; public: static ::java::lang::Class class$; }; diff --git a/libjava/java/util/TreeMap$7.h b/libjava/java/util/TreeMap$7.h new file mode 100644 index 0000000..7fd6109 --- /dev/null +++ b/libjava/java/util/TreeMap$7.h @@ -0,0 +1,26 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_TreeMap$7__ +#define __java_util_TreeMap$7__ + +#pragma interface + +#include + +class java::util::TreeMap$7 : public ::java::util::AbstractCollection +{ + +public: // actually package-private + TreeMap$7(::java::util::TreeMap *); +public: + jint size(); + ::java::util::Iterator * iterator(); + void clear(); +public: // actually package-private + ::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractCollection)))) this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_TreeMap$7__ diff --git a/libjava/java/util/TreeMap$DescendingMap.h b/libjava/java/util/TreeMap$DescendingMap.h new file mode 100644 index 0000000..70d6e6c --- /dev/null +++ b/libjava/java/util/TreeMap$DescendingMap.h @@ -0,0 +1,65 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_TreeMap$DescendingMap__ +#define __java_util_TreeMap$DescendingMap__ + +#pragma interface + +#include + +class java::util::TreeMap$DescendingMap : public ::java::lang::Object +{ + +public: + TreeMap$DescendingMap(::java::util::NavigableMap *); + ::java::util::Map$Entry * ceilingEntry(::java::lang::Object *); + ::java::lang::Object * ceilingKey(::java::lang::Object *); + void clear(); + ::java::util::Comparator * comparator(); + jboolean containsKey(::java::lang::Object *); + jboolean containsValue(::java::lang::Object *); + ::java::util::NavigableSet * descendingKeySet(); + ::java::util::NavigableMap * descendingMap(); + ::java::util::Set * entrySet(); + jboolean equals(::java::lang::Object *); + ::java::util::Map$Entry * firstEntry(); + ::java::lang::Object * firstKey(); + ::java::util::Map$Entry * floorEntry(::java::lang::Object *); + ::java::lang::Object * floorKey(::java::lang::Object *); + ::java::lang::Object * get(::java::lang::Object *); + jint hashCode(); + ::java::util::SortedMap * headMap(::java::lang::Object *); + ::java::util::NavigableMap * headMap(::java::lang::Object *, jboolean); + ::java::util::Map$Entry * higherEntry(::java::lang::Object *); + ::java::lang::Object * higherKey(::java::lang::Object *); + ::java::util::Set * keySet(); + jboolean isEmpty(); + ::java::util::Map$Entry * lastEntry(); + ::java::lang::Object * lastKey(); + ::java::util::Map$Entry * lowerEntry(::java::lang::Object *); + ::java::lang::Object * lowerKey(::java::lang::Object *); + ::java::util::NavigableSet * navigableKeySet(); + ::java::util::Map$Entry * pollFirstEntry(); + ::java::util::Map$Entry * pollLastEntry(); + ::java::lang::Object * put(::java::lang::Object *, ::java::lang::Object *); + void putAll(::java::util::Map *); + ::java::lang::Object * remove(::java::lang::Object *); + jint size(); + ::java::util::SortedMap * subMap(::java::lang::Object *, ::java::lang::Object *); + ::java::util::NavigableMap * subMap(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean); + ::java::util::SortedMap * tailMap(::java::lang::Object *); + ::java::util::NavigableMap * tailMap(::java::lang::Object *, jboolean); + ::java::lang::String * toString(); + ::java::util::Collection * values(); +private: + ::java::util::Set * __attribute__((aligned(__alignof__( ::java::lang::Object)))) entries; + ::java::util::Set * keys; + ::java::util::NavigableSet * nKeys; + ::java::util::Collection * values__; + ::java::util::NavigableMap * map; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_TreeMap$DescendingMap__ diff --git a/libjava/java/util/TreeMap$DescendingSet.h b/libjava/java/util/TreeMap$DescendingSet.h new file mode 100644 index 0000000..4824a27 --- /dev/null +++ b/libjava/java/util/TreeMap$DescendingSet.h @@ -0,0 +1,57 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_TreeMap$DescendingSet__ +#define __java_util_TreeMap$DescendingSet__ + +#pragma interface + +#include +#include + + +class java::util::TreeMap$DescendingSet : public ::java::lang::Object +{ + +public: + TreeMap$DescendingSet(::java::util::NavigableSet *); + jboolean add(::java::lang::Object *); + jboolean addAll(::java::util::Collection *); + ::java::lang::Object * ceiling(::java::lang::Object *); + void clear(); + ::java::util::Comparator * comparator(); + jboolean contains(::java::lang::Object *); + jboolean containsAll(::java::util::Collection *); + ::java::util::Iterator * descendingIterator(); + ::java::util::NavigableSet * descendingSet(); + jboolean equals(::java::lang::Object *); + ::java::lang::Object * first(); + ::java::lang::Object * floor(::java::lang::Object *); + jint hashCode(); + ::java::util::SortedSet * headSet(::java::lang::Object *); + ::java::util::NavigableSet * headSet(::java::lang::Object *, jboolean); + ::java::lang::Object * higher(::java::lang::Object *); + jboolean isEmpty(); + ::java::util::Iterator * iterator(); + ::java::lang::Object * last(); + ::java::lang::Object * lower(::java::lang::Object *); + ::java::lang::Object * pollFirst(); + ::java::lang::Object * pollLast(); + jboolean remove(::java::lang::Object *); + jboolean removeAll(::java::util::Collection *); + jboolean retainAll(::java::util::Collection *); + jint size(); + ::java::util::SortedSet * subSet(::java::lang::Object *, ::java::lang::Object *); + ::java::util::NavigableSet * subSet(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean); + ::java::util::SortedSet * tailSet(::java::lang::Object *); + ::java::util::NavigableSet * tailSet(::java::lang::Object *, jboolean); + JArray< ::java::lang::Object * > * toArray(); + JArray< ::java::lang::Object * > * toArray(JArray< ::java::lang::Object * > *); + ::java::lang::String * toString(); +private: + ::java::util::NavigableSet * __attribute__((aligned(__alignof__( ::java::lang::Object)))) set; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_TreeMap$DescendingSet__ diff --git a/libjava/java/util/TreeMap$EntrySet.h b/libjava/java/util/TreeMap$EntrySet.h new file mode 100644 index 0000000..ed03318 --- /dev/null +++ b/libjava/java/util/TreeMap$EntrySet.h @@ -0,0 +1,28 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_TreeMap$EntrySet__ +#define __java_util_TreeMap$EntrySet__ + +#pragma interface + +#include + +class java::util::TreeMap$EntrySet : public ::java::util::AbstractSet +{ + + TreeMap$EntrySet(::java::util::TreeMap *); +public: + virtual jint size(); + virtual ::java::util::Iterator * iterator(); + virtual void clear(); + virtual jboolean contains(::java::lang::Object *); + virtual jboolean remove(::java::lang::Object *); +public: // actually package-private + TreeMap$EntrySet(::java::util::TreeMap *, ::java::util::TreeMap$EntrySet *); + ::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_TreeMap$EntrySet__ diff --git a/libjava/java/util/TreeMap$KeySet.h b/libjava/java/util/TreeMap$KeySet.h new file mode 100644 index 0000000..0559a4d --- /dev/null +++ b/libjava/java/util/TreeMap$KeySet.h @@ -0,0 +1,29 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_TreeMap$KeySet__ +#define __java_util_TreeMap$KeySet__ + +#pragma interface + +#include + +class java::util::TreeMap$KeySet : public ::java::util::AbstractSet +{ + + TreeMap$KeySet(::java::util::TreeMap *); +public: + virtual jint size(); + virtual ::java::util::Iterator * iterator(); + virtual void clear(); + virtual jboolean contains(::java::lang::Object *); + virtual jboolean remove(::java::lang::Object *); +public: // actually package-private + TreeMap$KeySet(::java::util::TreeMap *, ::java::util::TreeMap$KeySet *); + TreeMap$KeySet(::java::util::TreeMap *, ::java::util::TreeMap$KeySet *, ::java::util::TreeMap$KeySet *); + ::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_TreeMap$KeySet__ diff --git a/libjava/java/util/TreeMap$NavigableEntrySet.h b/libjava/java/util/TreeMap$NavigableEntrySet.h new file mode 100644 index 0000000..cdbed6e --- /dev/null +++ b/libjava/java/util/TreeMap$NavigableEntrySet.h @@ -0,0 +1,55 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_TreeMap$NavigableEntrySet__ +#define __java_util_TreeMap$NavigableEntrySet__ + +#pragma interface + +#include + +class java::util::TreeMap$NavigableEntrySet : public ::java::util::TreeMap$EntrySet +{ + + TreeMap$NavigableEntrySet(::java::util::TreeMap *); +public: + ::java::util::Map$Entry * TreeMap$NavigableEntrySet$ceiling(::java::util::Map$Entry *); + ::java::util::Comparator * comparator(); + ::java::util::Iterator * descendingIterator(); + ::java::util::NavigableSet * descendingSet(); + ::java::util::Map$Entry * TreeMap$NavigableEntrySet$first(); + ::java::util::Map$Entry * TreeMap$NavigableEntrySet$floor(::java::util::Map$Entry *); + ::java::util::SortedSet * TreeMap$NavigableEntrySet$headSet(::java::util::Map$Entry *); + ::java::util::NavigableSet * TreeMap$NavigableEntrySet$headSet(::java::util::Map$Entry *, jboolean); + ::java::util::Map$Entry * TreeMap$NavigableEntrySet$higher(::java::util::Map$Entry *); + ::java::util::Map$Entry * TreeMap$NavigableEntrySet$last(); + ::java::util::Map$Entry * TreeMap$NavigableEntrySet$lower(::java::util::Map$Entry *); + ::java::util::Map$Entry * TreeMap$NavigableEntrySet$pollFirst(); + ::java::util::Map$Entry * TreeMap$NavigableEntrySet$pollLast(); + ::java::util::SortedSet * TreeMap$NavigableEntrySet$subSet(::java::util::Map$Entry *, ::java::util::Map$Entry *); + ::java::util::NavigableSet * TreeMap$NavigableEntrySet$subSet(::java::util::Map$Entry *, jboolean, ::java::util::Map$Entry *, jboolean); + ::java::util::SortedSet * TreeMap$NavigableEntrySet$tailSet(::java::util::Map$Entry *); + ::java::util::NavigableSet * TreeMap$NavigableEntrySet$tailSet(::java::util::Map$Entry *, jboolean); + ::java::lang::Object * pollFirst(); + ::java::lang::Object * higher(::java::lang::Object *); + ::java::lang::Object * lower(::java::lang::Object *); + ::java::lang::Object * pollLast(); + ::java::lang::Object * first(); + ::java::lang::Object * last(); + ::java::util::NavigableSet * subSet(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean); + ::java::util::SortedSet * subSet(::java::lang::Object *, ::java::lang::Object *); + ::java::lang::Object * ceiling(::java::lang::Object *); + ::java::lang::Object * floor(::java::lang::Object *); + ::java::util::NavigableSet * tailSet(::java::lang::Object *, jboolean); + ::java::util::SortedSet * tailSet(::java::lang::Object *); + ::java::util::NavigableSet * headSet(::java::lang::Object *, jboolean); + ::java::util::SortedSet * headSet(::java::lang::Object *); +public: // actually package-private + TreeMap$NavigableEntrySet(::java::util::TreeMap *, ::java::util::TreeMap$NavigableEntrySet *); + static ::java::util::TreeMap * access$15(::java::util::TreeMap$NavigableEntrySet *); + ::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::TreeMap$EntrySet)))) this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_TreeMap$NavigableEntrySet__ diff --git a/libjava/java/util/TreeMap$NavigableKeySet.h b/libjava/java/util/TreeMap$NavigableKeySet.h new file mode 100644 index 0000000..247ac27 --- /dev/null +++ b/libjava/java/util/TreeMap$NavigableKeySet.h @@ -0,0 +1,40 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_TreeMap$NavigableKeySet__ +#define __java_util_TreeMap$NavigableKeySet__ + +#pragma interface + +#include + +class java::util::TreeMap$NavigableKeySet : public ::java::util::TreeMap$KeySet +{ + + TreeMap$NavigableKeySet(::java::util::TreeMap *); +public: + ::java::lang::Object * ceiling(::java::lang::Object *); + ::java::util::Comparator * comparator(); + ::java::util::Iterator * descendingIterator(); + ::java::util::NavigableSet * descendingSet(); + ::java::lang::Object * first(); + ::java::lang::Object * floor(::java::lang::Object *); + ::java::util::SortedSet * headSet(::java::lang::Object *); + ::java::util::NavigableSet * headSet(::java::lang::Object *, jboolean); + ::java::lang::Object * higher(::java::lang::Object *); + ::java::lang::Object * last(); + ::java::lang::Object * lower(::java::lang::Object *); + ::java::lang::Object * pollFirst(); + ::java::lang::Object * pollLast(); + ::java::util::SortedSet * subSet(::java::lang::Object *, ::java::lang::Object *); + ::java::util::NavigableSet * subSet(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean); + ::java::util::SortedSet * tailSet(::java::lang::Object *); + ::java::util::NavigableSet * tailSet(::java::lang::Object *, jboolean); +public: // actually package-private + TreeMap$NavigableKeySet(::java::util::TreeMap *, ::java::util::TreeMap$NavigableKeySet *); + ::java::util::TreeMap * __attribute__((aligned(__alignof__( ::java::util::TreeMap$KeySet)))) this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_TreeMap$NavigableKeySet__ diff --git a/libjava/java/util/TreeMap$SubMap$EntrySet.h b/libjava/java/util/TreeMap$SubMap$EntrySet.h new file mode 100644 index 0000000..70a2ffc --- /dev/null +++ b/libjava/java/util/TreeMap$SubMap$EntrySet.h @@ -0,0 +1,28 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_TreeMap$SubMap$EntrySet__ +#define __java_util_TreeMap$SubMap$EntrySet__ + +#pragma interface + +#include + +class java::util::TreeMap$SubMap$EntrySet : public ::java::util::AbstractSet +{ + + TreeMap$SubMap$EntrySet(::java::util::TreeMap$SubMap *); +public: + virtual jint size(); + virtual ::java::util::Iterator * iterator(); + virtual void clear(); + virtual jboolean contains(::java::lang::Object *); + virtual jboolean remove(::java::lang::Object *); +public: // actually package-private + TreeMap$SubMap$EntrySet(::java::util::TreeMap$SubMap *, ::java::util::TreeMap$SubMap$EntrySet *); + ::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$1; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_TreeMap$SubMap$EntrySet__ diff --git a/libjava/java/util/TreeMap$SubMap$KeySet.h b/libjava/java/util/TreeMap$SubMap$KeySet.h new file mode 100644 index 0000000..812d7cd --- /dev/null +++ b/libjava/java/util/TreeMap$SubMap$KeySet.h @@ -0,0 +1,29 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_TreeMap$SubMap$KeySet__ +#define __java_util_TreeMap$SubMap$KeySet__ + +#pragma interface + +#include + +class java::util::TreeMap$SubMap$KeySet : public ::java::util::AbstractSet +{ + + TreeMap$SubMap$KeySet(::java::util::TreeMap$SubMap *); +public: + virtual jint size(); + virtual ::java::util::Iterator * iterator(); + virtual void clear(); + virtual jboolean contains(::java::lang::Object *); + virtual jboolean remove(::java::lang::Object *); +public: // actually package-private + TreeMap$SubMap$KeySet(::java::util::TreeMap$SubMap *, ::java::util::TreeMap$SubMap$KeySet *); + TreeMap$SubMap$KeySet(::java::util::TreeMap$SubMap *, ::java::util::TreeMap$SubMap$KeySet *, ::java::util::TreeMap$SubMap$KeySet *); + ::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) this$1; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_TreeMap$SubMap$KeySet__ diff --git a/libjava/java/util/TreeMap$SubMap$NavigableEntrySet.h b/libjava/java/util/TreeMap$SubMap$NavigableEntrySet.h new file mode 100644 index 0000000..34c9977 --- /dev/null +++ b/libjava/java/util/TreeMap$SubMap$NavigableEntrySet.h @@ -0,0 +1,55 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_TreeMap$SubMap$NavigableEntrySet__ +#define __java_util_TreeMap$SubMap$NavigableEntrySet__ + +#pragma interface + +#include + +class java::util::TreeMap$SubMap$NavigableEntrySet : public ::java::util::TreeMap$SubMap$EntrySet +{ + + TreeMap$SubMap$NavigableEntrySet(::java::util::TreeMap$SubMap *); +public: + ::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$ceiling(::java::util::Map$Entry *); + ::java::util::Comparator * comparator(); + ::java::util::Iterator * descendingIterator(); + ::java::util::NavigableSet * descendingSet(); + ::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$first(); + ::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$floor(::java::util::Map$Entry *); + ::java::util::SortedSet * TreeMap$SubMap$NavigableEntrySet$headSet(::java::util::Map$Entry *); + ::java::util::NavigableSet * TreeMap$SubMap$NavigableEntrySet$headSet(::java::util::Map$Entry *, jboolean); + ::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$higher(::java::util::Map$Entry *); + ::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$last(); + ::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$lower(::java::util::Map$Entry *); + ::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$pollFirst(); + ::java::util::Map$Entry * TreeMap$SubMap$NavigableEntrySet$pollLast(); + ::java::util::SortedSet * TreeMap$SubMap$NavigableEntrySet$subSet(::java::util::Map$Entry *, ::java::util::Map$Entry *); + ::java::util::NavigableSet * TreeMap$SubMap$NavigableEntrySet$subSet(::java::util::Map$Entry *, jboolean, ::java::util::Map$Entry *, jboolean); + ::java::util::SortedSet * TreeMap$SubMap$NavigableEntrySet$tailSet(::java::util::Map$Entry *); + ::java::util::NavigableSet * TreeMap$SubMap$NavigableEntrySet$tailSet(::java::util::Map$Entry *, jboolean); + ::java::lang::Object * pollFirst(); + ::java::lang::Object * higher(::java::lang::Object *); + ::java::lang::Object * lower(::java::lang::Object *); + ::java::lang::Object * pollLast(); + ::java::lang::Object * first(); + ::java::lang::Object * last(); + ::java::util::NavigableSet * subSet(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean); + ::java::util::SortedSet * subSet(::java::lang::Object *, ::java::lang::Object *); + ::java::lang::Object * ceiling(::java::lang::Object *); + ::java::lang::Object * floor(::java::lang::Object *); + ::java::util::NavigableSet * tailSet(::java::lang::Object *, jboolean); + ::java::util::SortedSet * tailSet(::java::lang::Object *); + ::java::util::NavigableSet * headSet(::java::lang::Object *, jboolean); + ::java::util::SortedSet * headSet(::java::lang::Object *); +public: // actually package-private + TreeMap$SubMap$NavigableEntrySet(::java::util::TreeMap$SubMap *, ::java::util::TreeMap$SubMap$NavigableEntrySet *); + static ::java::util::TreeMap$SubMap * access$15(::java::util::TreeMap$SubMap$NavigableEntrySet *); + ::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::TreeMap$SubMap$EntrySet)))) this$1; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_TreeMap$SubMap$NavigableEntrySet__ diff --git a/libjava/java/util/TreeMap$SubMap$NavigableKeySet.h b/libjava/java/util/TreeMap$SubMap$NavigableKeySet.h new file mode 100644 index 0000000..66509d1 --- /dev/null +++ b/libjava/java/util/TreeMap$SubMap$NavigableKeySet.h @@ -0,0 +1,40 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_TreeMap$SubMap$NavigableKeySet__ +#define __java_util_TreeMap$SubMap$NavigableKeySet__ + +#pragma interface + +#include + +class java::util::TreeMap$SubMap$NavigableKeySet : public ::java::util::TreeMap$SubMap$KeySet +{ + + TreeMap$SubMap$NavigableKeySet(::java::util::TreeMap$SubMap *); +public: + ::java::lang::Object * ceiling(::java::lang::Object *); + ::java::util::Comparator * comparator(); + ::java::util::Iterator * descendingIterator(); + ::java::util::NavigableSet * descendingSet(); + ::java::lang::Object * first(); + ::java::lang::Object * floor(::java::lang::Object *); + ::java::util::SortedSet * headSet(::java::lang::Object *); + ::java::util::NavigableSet * headSet(::java::lang::Object *, jboolean); + ::java::lang::Object * higher(::java::lang::Object *); + ::java::lang::Object * last(); + ::java::lang::Object * lower(::java::lang::Object *); + ::java::lang::Object * pollFirst(); + ::java::lang::Object * pollLast(); + ::java::util::SortedSet * subSet(::java::lang::Object *, ::java::lang::Object *); + ::java::util::NavigableSet * subSet(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean); + ::java::util::SortedSet * tailSet(::java::lang::Object *); + ::java::util::NavigableSet * tailSet(::java::lang::Object *, jboolean); +public: // actually package-private + TreeMap$SubMap$NavigableKeySet(::java::util::TreeMap$SubMap *, ::java::util::TreeMap$SubMap$NavigableKeySet *); + ::java::util::TreeMap$SubMap * __attribute__((aligned(__alignof__( ::java::util::TreeMap$SubMap$KeySet)))) this$1; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_util_TreeMap$SubMap$NavigableKeySet__ diff --git a/libjava/java/util/TreeMap$SubMap.h b/libjava/java/util/TreeMap$SubMap.h index ef206c8..accd468 100644 --- a/libjava/java/util/TreeMap$SubMap.h +++ b/libjava/java/util/TreeMap$SubMap.h @@ -15,21 +15,39 @@ public: // actually package-private TreeMap$SubMap(::java::util::TreeMap *, ::java::lang::Object *, ::java::lang::Object *); jboolean keyInRange(::java::lang::Object *); public: + ::java::util::Map$Entry * ceilingEntry(::java::lang::Object *); + ::java::lang::Object * ceilingKey(::java::lang::Object *); + ::java::util::NavigableSet * descendingKeySet(); + ::java::util::NavigableMap * descendingMap(); void clear(); ::java::util::Comparator * comparator(); jboolean containsKey(::java::lang::Object *); jboolean containsValue(::java::lang::Object *); ::java::util::Set * entrySet(); + ::java::util::Map$Entry * firstEntry(); ::java::lang::Object * firstKey(); + ::java::util::Map$Entry * floorEntry(::java::lang::Object *); + ::java::lang::Object * floorKey(::java::lang::Object *); ::java::lang::Object * get(::java::lang::Object *); ::java::util::SortedMap * headMap(::java::lang::Object *); + ::java::util::NavigableMap * headMap(::java::lang::Object *, jboolean); ::java::util::Set * keySet(); + ::java::util::Map$Entry * higherEntry(::java::lang::Object *); + ::java::lang::Object * higherKey(::java::lang::Object *); + ::java::util::Map$Entry * lastEntry(); ::java::lang::Object * lastKey(); + ::java::util::Map$Entry * lowerEntry(::java::lang::Object *); + ::java::lang::Object * lowerKey(::java::lang::Object *); + ::java::util::NavigableSet * navigableKeySet(); + ::java::util::Map$Entry * pollFirstEntry(); + ::java::util::Map$Entry * pollLastEntry(); ::java::lang::Object * put(::java::lang::Object *, ::java::lang::Object *); ::java::lang::Object * remove(::java::lang::Object *); jint size(); ::java::util::SortedMap * subMap(::java::lang::Object *, ::java::lang::Object *); + ::java::util::NavigableMap * subMap(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean); ::java::util::SortedMap * tailMap(::java::lang::Object *); + ::java::util::NavigableMap * tailMap(::java::lang::Object *, jboolean); ::java::util::Collection * values(); public: // actually package-private static ::java::util::TreeMap * access$0(::java::util::TreeMap$SubMap *); @@ -37,6 +55,8 @@ public: // actually package-private ::java::lang::Object * maxKey; private: ::java::util::Set * entries; + ::java::util::NavigableMap * descendingMap__; + ::java::util::NavigableSet * nKeys; public: // actually package-private ::java::util::TreeMap * this$0; public: diff --git a/libjava/java/util/TreeMap.h b/libjava/java/util/TreeMap.h index a68bcf6..b87c892 100644 --- a/libjava/java/util/TreeMap.h +++ b/libjava/java/util/TreeMap.h @@ -25,6 +25,7 @@ public: virtual ::java::lang::Object * firstKey(); virtual ::java::lang::Object * get(::java::lang::Object *); virtual ::java::util::SortedMap * headMap(::java::lang::Object *); + virtual ::java::util::NavigableMap * headMap(::java::lang::Object *, jboolean); virtual ::java::util::Set * keySet(); virtual ::java::lang::Object * lastKey(); virtual ::java::lang::Object * put(::java::lang::Object *, ::java::lang::Object *); @@ -32,7 +33,9 @@ public: virtual ::java::lang::Object * remove(::java::lang::Object *); virtual jint size(); virtual ::java::util::SortedMap * subMap(::java::lang::Object *, ::java::lang::Object *); + virtual ::java::util::NavigableMap * subMap(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean); virtual ::java::util::SortedMap * tailMap(::java::lang::Object *); + virtual ::java::util::NavigableMap * tailMap(::java::lang::Object *, jboolean); virtual ::java::util::Collection * values(); public: // actually package-private virtual jint compare(::java::lang::Object *, ::java::lang::Object *); @@ -43,11 +46,13 @@ public: // actually package-private virtual ::java::util::TreeMap$Node * firstNode(); virtual ::java::util::TreeMap$Node * getNode(::java::lang::Object *); virtual ::java::util::TreeMap$Node * highestLessThan(::java::lang::Object *); + virtual ::java::util::TreeMap$Node * highestLessThan(::java::lang::Object *, jboolean); private: void insertFixup(::java::util::TreeMap$Node *); ::java::util::TreeMap$Node * lastNode(); public: // actually package-private virtual ::java::util::TreeMap$Node * lowestGreaterThan(::java::lang::Object *, jboolean); + virtual ::java::util::TreeMap$Node * lowestGreaterThan(::java::lang::Object *, jboolean, jboolean); private: ::java::util::TreeMap$Node * predecessor(::java::util::TreeMap$Node *); public: // actually package-private @@ -64,6 +69,23 @@ public: // actually package-private virtual ::java::util::TreeMap$Node * successor(::java::util::TreeMap$Node *); private: void writeObject(::java::io::ObjectOutputStream *); +public: + virtual ::java::util::Map$Entry * ceilingEntry(::java::lang::Object *); + virtual ::java::lang::Object * ceilingKey(::java::lang::Object *); + virtual ::java::util::NavigableSet * descendingKeySet(); + virtual ::java::util::NavigableMap * descendingMap(); + virtual ::java::util::Map$Entry * firstEntry(); + virtual ::java::util::Map$Entry * floorEntry(::java::lang::Object *); + virtual ::java::lang::Object * floorKey(::java::lang::Object *); + virtual ::java::util::Map$Entry * higherEntry(::java::lang::Object *); + virtual ::java::lang::Object * higherKey(::java::lang::Object *); + virtual ::java::util::Map$Entry * lastEntry(); + virtual ::java::util::Map$Entry * lowerEntry(::java::lang::Object *); + virtual ::java::lang::Object * lowerKey(::java::lang::Object *); + virtual ::java::util::NavigableSet * navigableKeySet(); + virtual ::java::util::Map$Entry * pollFirstEntry(); + virtual ::java::util::Map$Entry * pollLastEntry(); +private: static const jlong serialVersionUID = 919286545866124006LL; public: // actually package-private static const jint RED = -1; @@ -75,6 +97,8 @@ public: // actually package-private jint size__; private: ::java::util::Set * entries; + ::java::util::NavigableMap * descendingMap__; + ::java::util::NavigableSet * nKeys; public: // actually package-private jint modCount; ::java::util::Comparator * comparator__; diff --git a/libjava/java/util/TreeSet.h b/libjava/java/util/TreeSet.h index 565d828..1e19c19 100644 --- a/libjava/java/util/TreeSet.h +++ b/libjava/java/util/TreeSet.h @@ -17,7 +17,7 @@ public: TreeSet(::java::util::Collection *); TreeSet(::java::util::SortedSet *); private: - TreeSet(::java::util::SortedMap *); + TreeSet(::java::util::NavigableMap *); public: virtual jboolean add(::java::lang::Object *); virtual jboolean addAll(::java::util::Collection *); @@ -27,18 +27,31 @@ public: virtual jboolean contains(::java::lang::Object *); virtual ::java::lang::Object * first(); virtual ::java::util::SortedSet * headSet(::java::lang::Object *); + virtual ::java::util::NavigableSet * headSet(::java::lang::Object *, jboolean); virtual jboolean isEmpty(); virtual ::java::util::Iterator * iterator(); virtual ::java::lang::Object * last(); virtual jboolean remove(::java::lang::Object *); virtual jint size(); virtual ::java::util::SortedSet * subSet(::java::lang::Object *, ::java::lang::Object *); + virtual ::java::util::NavigableSet * subSet(::java::lang::Object *, jboolean, ::java::lang::Object *, jboolean); virtual ::java::util::SortedSet * tailSet(::java::lang::Object *); + virtual ::java::util::NavigableSet * tailSet(::java::lang::Object *, jboolean); private: void writeObject(::java::io::ObjectOutputStream *); void readObject(::java::io::ObjectInputStream *); +public: + virtual ::java::lang::Object * ceiling(::java::lang::Object *); + virtual ::java::util::Iterator * descendingIterator(); + virtual ::java::util::NavigableSet * descendingSet(); + virtual ::java::lang::Object * floor(::java::lang::Object *); + virtual ::java::lang::Object * higher(::java::lang::Object *); + virtual ::java::lang::Object * lower(::java::lang::Object *); + virtual ::java::lang::Object * pollFirst(); + virtual ::java::lang::Object * pollLast(); +private: static const jlong serialVersionUID = -2479143000061671589LL; - ::java::util::SortedMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) map; + ::java::util::NavigableMap * __attribute__((aligned(__alignof__( ::java::util::AbstractSet)))) map; public: static ::java::lang::Class class$; }; diff --git a/libjava/java/util/logging/Logger.java b/libjava/java/util/logging/Logger.java index adb07ec..04f24d3 100644 --- a/libjava/java/util/logging/Logger.java +++ b/libjava/java/util/logging/Logger.java @@ -1,5 +1,5 @@ /* Logger.java -- a class for logging messages - Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -276,8 +276,8 @@ public class Logger LogManager lm = LogManager.getLogManager(); Logger result; - /* Throw NullPointerException if name is null. */ - name.getClass(); + if (name == null) + throw new NullPointerException(); /* Without synchronized(lm), it could happen that another thread * would create a logger between our calls to getLogger and @@ -1013,8 +1013,8 @@ public class Logger public synchronized void addHandler(Handler handler) throws SecurityException { - /* Throw a new NullPointerException if handler is null. */ - handler.getClass(); + if (handler == null) + throw new NullPointerException(); /* An application is allowed to control an anonymous logger * without having the permission to control the logging @@ -1057,8 +1057,8 @@ public class Logger if (!anonymous) LogManager.getLogManager().checkAccess(); - /* Throw a new NullPointerException if handler is null. */ - handler.getClass(); + if (handler == null) + throw new NullPointerException(); handlerList.remove(handler); handlers = getHandlers(); @@ -1166,8 +1166,8 @@ public class Logger */ public synchronized void setParent(Logger parent) { - /* Throw a new NullPointerException if parent is null. */ - parent.getClass(); + if (parent == null) + throw new NullPointerException(); if (this == root) throw new IllegalArgumentException( diff --git a/libjava/java/util/prefs/Preferences$1.h b/libjava/java/util/prefs/Preferences$1.h index 09a3f1c..3dd9a0c 100644 --- a/libjava/java/util/prefs/Preferences$1.h +++ b/libjava/java/util/prefs/Preferences$1.h @@ -14,6 +14,7 @@ class java::util::prefs::Preferences$1 : public ::java::lang::Object public: // actually package-private Preferences$1(); public: + ::java::util::prefs::PreferencesFactory * Preferences$1$run(); ::java::lang::Object * run(); static ::java::lang::Class class$; }; diff --git a/libjava/java/util/regex/Pattern.h b/libjava/java/util/regex/Pattern.h index 7bfc275..267cafd 100644 --- a/libjava/java/util/regex/Pattern.h +++ b/libjava/java/util/regex/Pattern.h @@ -41,6 +41,7 @@ public: JArray< ::java::lang::String * > * split(::java::lang::CharSequence *); JArray< ::java::lang::String * > * split(::java::lang::CharSequence *, jint); ::java::lang::String * pattern(); + ::java::lang::String * toString(); private: static const jlong serialVersionUID = 5073258162644648461LL; public: diff --git a/libjava/java/util/spi/CurrencyNameProvider.h b/libjava/java/util/spi/CurrencyNameProvider.h new file mode 100644 index 0000000..1375c15 --- /dev/null +++ b/libjava/java/util/spi/CurrencyNameProvider.h @@ -0,0 +1,21 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_spi_CurrencyNameProvider__ +#define __java_util_spi_CurrencyNameProvider__ + +#pragma interface + +#include + +class java::util::spi::CurrencyNameProvider : public ::java::util::spi::LocaleServiceProvider +{ + +public: // actually protected + CurrencyNameProvider(); +public: + virtual ::java::lang::String * getSymbol(::java::lang::String *, ::java::util::Locale *) = 0; + static ::java::lang::Class class$; +}; + +#endif // __java_util_spi_CurrencyNameProvider__ diff --git a/libjava/java/util/spi/LocaleNameProvider.h b/libjava/java/util/spi/LocaleNameProvider.h new file mode 100644 index 0000000..d4194c5 --- /dev/null +++ b/libjava/java/util/spi/LocaleNameProvider.h @@ -0,0 +1,23 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_spi_LocaleNameProvider__ +#define __java_util_spi_LocaleNameProvider__ + +#pragma interface + +#include + +class java::util::spi::LocaleNameProvider : public ::java::util::spi::LocaleServiceProvider +{ + +public: // actually protected + LocaleNameProvider(); +public: + virtual ::java::lang::String * getDisplayCountry(::java::lang::String *, ::java::util::Locale *) = 0; + virtual ::java::lang::String * getDisplayLanguage(::java::lang::String *, ::java::util::Locale *) = 0; + virtual ::java::lang::String * getDisplayVariant(::java::lang::String *, ::java::util::Locale *) = 0; + static ::java::lang::Class class$; +}; + +#endif // __java_util_spi_LocaleNameProvider__ diff --git a/libjava/java/util/spi/LocaleServiceProvider.h b/libjava/java/util/spi/LocaleServiceProvider.h new file mode 100644 index 0000000..69cc231 --- /dev/null +++ b/libjava/java/util/spi/LocaleServiceProvider.h @@ -0,0 +1,23 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_spi_LocaleServiceProvider__ +#define __java_util_spi_LocaleServiceProvider__ + +#pragma interface + +#include +#include + + +class java::util::spi::LocaleServiceProvider : public ::java::lang::Object +{ + +public: // actually protected + LocaleServiceProvider(); +public: + virtual JArray< ::java::util::Locale * > * getAvailableLocales() = 0; + static ::java::lang::Class class$; +}; + +#endif // __java_util_spi_LocaleServiceProvider__ diff --git a/libjava/java/util/spi/TimeZoneNameProvider.h b/libjava/java/util/spi/TimeZoneNameProvider.h new file mode 100644 index 0000000..8e43093 --- /dev/null +++ b/libjava/java/util/spi/TimeZoneNameProvider.h @@ -0,0 +1,21 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_util_spi_TimeZoneNameProvider__ +#define __java_util_spi_TimeZoneNameProvider__ + +#pragma interface + +#include + +class java::util::spi::TimeZoneNameProvider : public ::java::util::spi::LocaleServiceProvider +{ + +public: // actually protected + TimeZoneNameProvider(); +public: + virtual ::java::lang::String * getDisplayName(::java::lang::String *, jboolean, jint, ::java::util::Locale *) = 0; + static ::java::lang::Class class$; +}; + +#endif // __java_util_spi_TimeZoneNameProvider__ -- cgit v1.1