diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /libjava/java/text | |
download | cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2 cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'libjava/java/text')
42 files changed, 2701 insertions, 0 deletions
diff --git a/libjava/java/text/Annotation.h b/libjava/java/text/Annotation.h new file mode 100644 index 000000000..7170a3f91 --- /dev/null +++ b/libjava/java/text/Annotation.h @@ -0,0 +1,34 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_Annotation__ +#define __java_text_Annotation__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class Annotation; + } + } +} + +class java::text::Annotation : public ::java::lang::Object +{ + +public: + Annotation(::java::lang::Object *); + virtual ::java::lang::Object * getValue(); + virtual ::java::lang::String * toString(); +private: + ::java::lang::Object * __attribute__((aligned(__alignof__( ::java::lang::Object)))) attrib; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_Annotation__ diff --git a/libjava/java/text/AttributedCharacterIterator$Attribute.h b/libjava/java/text/AttributedCharacterIterator$Attribute.h new file mode 100644 index 000000000..f47224044 --- /dev/null +++ b/libjava/java/text/AttributedCharacterIterator$Attribute.h @@ -0,0 +1,44 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_AttributedCharacterIterator$Attribute__ +#define __java_text_AttributedCharacterIterator$Attribute__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class AttributedCharacterIterator$Attribute; + } + } +} + +class java::text::AttributedCharacterIterator$Attribute : public ::java::lang::Object +{ + +public: // actually protected + AttributedCharacterIterator$Attribute(::java::lang::String *); + virtual ::java::lang::String * getName(); + virtual ::java::lang::Object * readResolve(); +public: + virtual jboolean equals(::java::lang::Object *); + virtual jint hashCode(); + virtual ::java::lang::String * toString(); +private: + static const jlong serialVersionUID = -9142742483513960612LL; +public: + static ::java::text::AttributedCharacterIterator$Attribute * LANGUAGE; + static ::java::text::AttributedCharacterIterator$Attribute * READING; + static ::java::text::AttributedCharacterIterator$Attribute * INPUT_METHOD_SEGMENT; +private: + ::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) name; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_AttributedCharacterIterator$Attribute__ diff --git a/libjava/java/text/AttributedCharacterIterator.h b/libjava/java/text/AttributedCharacterIterator.h new file mode 100644 index 000000000..c5b04f6fa --- /dev/null +++ b/libjava/java/text/AttributedCharacterIterator.h @@ -0,0 +1,47 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_AttributedCharacterIterator__ +#define __java_text_AttributedCharacterIterator__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class AttributedCharacterIterator; + class AttributedCharacterIterator$Attribute; + } + } +} + +class java::text::AttributedCharacterIterator : public ::java::lang::Object +{ + +public: + virtual ::java::util::Set * getAllAttributeKeys() = 0; + virtual ::java::util::Map * getAttributes() = 0; + virtual ::java::lang::Object * getAttribute(::java::text::AttributedCharacterIterator$Attribute *) = 0; + virtual jint getRunStart() = 0; + virtual jint getRunStart(::java::util::Set *) = 0; + virtual jint getRunStart(::java::text::AttributedCharacterIterator$Attribute *) = 0; + virtual jint getRunLimit() = 0; + virtual jint getRunLimit(::java::util::Set *) = 0; + virtual jint getRunLimit(::java::text::AttributedCharacterIterator$Attribute *) = 0; + virtual jchar current() = 0; + virtual jchar next() = 0; + virtual jchar previous() = 0; + virtual jchar first() = 0; + virtual jchar last() = 0; + virtual jint getIndex() = 0; + virtual jchar setIndex(jint) = 0; + virtual jint getBeginIndex() = 0; + virtual jint getEndIndex() = 0; + static ::java::lang::Class class$; +} __attribute__ ((java_interface)); + +#endif // __java_text_AttributedCharacterIterator__ diff --git a/libjava/java/text/AttributedString$AttributeRange.h b/libjava/java/text/AttributedString$AttributeRange.h new file mode 100644 index 000000000..49e33d1ad --- /dev/null +++ b/libjava/java/text/AttributedString$AttributeRange.h @@ -0,0 +1,35 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_AttributedString$AttributeRange__ +#define __java_text_AttributedString$AttributeRange__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class AttributedString; + class AttributedString$AttributeRange; + } + } +} + +class java::text::AttributedString$AttributeRange : public ::java::lang::Object +{ + +public: // actually package-private + AttributedString$AttributeRange(::java::text::AttributedString *, ::java::util::Map *, jint, jint); + ::java::util::Map * __attribute__((aligned(__alignof__( ::java::lang::Object)))) attribs; + jint beginIndex; + jint endIndex; + ::java::text::AttributedString * this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_AttributedString$AttributeRange__ diff --git a/libjava/java/text/AttributedString.h b/libjava/java/text/AttributedString.h new file mode 100644 index 000000000..51b4c0bc2 --- /dev/null +++ b/libjava/java/text/AttributedString.h @@ -0,0 +1,49 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_AttributedString__ +#define __java_text_AttributedString__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class AttributedCharacterIterator; + class AttributedCharacterIterator$Attribute; + class AttributedString; + class AttributedString$AttributeRange; + class StringCharacterIterator; + } + } +} + +class java::text::AttributedString : public ::java::lang::Object +{ + +public: + AttributedString(::java::lang::String *); + AttributedString(::java::lang::String *, ::java::util::Map *); + AttributedString(::java::text::AttributedCharacterIterator *); + AttributedString(::java::text::AttributedCharacterIterator *, jint, jint); + AttributedString(::java::text::AttributedCharacterIterator *, jint, jint, JArray< ::java::text::AttributedCharacterIterator$Attribute * > *); + virtual void addAttribute(::java::text::AttributedCharacterIterator$Attribute *, ::java::lang::Object *); + virtual void addAttribute(::java::text::AttributedCharacterIterator$Attribute *, ::java::lang::Object *, jint, jint); + virtual void addAttributes(::java::util::Map *, jint, jint); + virtual ::java::text::AttributedCharacterIterator * getIterator(); + virtual ::java::text::AttributedCharacterIterator * getIterator(JArray< ::java::text::AttributedCharacterIterator$Attribute * > *); + virtual ::java::text::AttributedCharacterIterator * getIterator(JArray< ::java::text::AttributedCharacterIterator$Attribute * > *, jint, jint); +private: + ::java::text::StringCharacterIterator * __attribute__((aligned(__alignof__( ::java::lang::Object)))) sci; + JArray< ::java::text::AttributedString$AttributeRange * > * attribs; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_AttributedString__ diff --git a/libjava/java/text/AttributedStringIterator.h b/libjava/java/text/AttributedStringIterator.h new file mode 100644 index 000000000..bc2e77f89 --- /dev/null +++ b/libjava/java/text/AttributedStringIterator.h @@ -0,0 +1,63 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_AttributedStringIterator__ +#define __java_text_AttributedStringIterator__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class AttributedCharacterIterator$Attribute; + class AttributedString$AttributeRange; + class AttributedStringIterator; + class CharacterIterator; + class StringCharacterIterator; + } + } +} + +class java::text::AttributedStringIterator : public ::java::lang::Object +{ + +public: // actually package-private + AttributedStringIterator(::java::text::StringCharacterIterator *, JArray< ::java::text::AttributedString$AttributeRange * > *, jint, jint, JArray< ::java::text::AttributedCharacterIterator$Attribute * > *); +public: + virtual ::java::lang::Object * clone(); + virtual jchar current(); + virtual jchar next(); + virtual jchar previous(); + virtual jchar first(); + virtual jchar last(); + virtual jint getIndex(); + virtual jchar setIndex(jint); + virtual jint getBeginIndex(); + virtual jint getEndIndex(); + virtual ::java::util::Set * getAllAttributeKeys(); + virtual jint getRunLimit(); + virtual jint getRunLimit(::java::text::AttributedCharacterIterator$Attribute *); + virtual jint getRunLimit(::java::util::Set *); + virtual jint getRunStart(); + virtual jint getRunStart(::java::text::AttributedCharacterIterator$Attribute *); + virtual jint getRunStart(::java::util::Set *); +private: + ::java::lang::Object * getAttribute(::java::text::AttributedCharacterIterator$Attribute *, jint); +public: + virtual ::java::lang::Object * getAttribute(::java::text::AttributedCharacterIterator$Attribute *); + virtual ::java::util::Map * getAttributes(); +private: + ::java::text::CharacterIterator * __attribute__((aligned(__alignof__( ::java::lang::Object)))) ci; + JArray< ::java::text::AttributedString$AttributeRange * > * attribs; + JArray< ::java::text::AttributedCharacterIterator$Attribute * > * restricts; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_AttributedStringIterator__ diff --git a/libjava/java/text/Bidi.h b/libjava/java/text/Bidi.h new file mode 100644 index 000000000..59b80ed5a --- /dev/null +++ b/libjava/java/text/Bidi.h @@ -0,0 +1,80 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_Bidi__ +#define __java_text_Bidi__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class AttributedCharacterIterator; + class Bidi; + } + } +} + +class java::text::Bidi : public ::java::lang::Object +{ + +public: + Bidi(::java::text::AttributedCharacterIterator *); + Bidi(JArray< jchar > *, jint, JArray< jbyte > *, jint, jint, jint); + Bidi(::java::lang::String *, jint); +private: + void computeTypes(); + jint computeParagraphEmbeddingLevel(); + void computeExplicitLevels(); + void computeRuns(); + void resolveWeakTypes(); + void resolveNeutralTypes(); + void resolveImplicitLevels(); + void reinsertFormattingCodes(); + void runBidi(); +public: + jboolean baseIsLeftToRight(); + ::java::text::Bidi * createLineBidi(jint, jint); + jint getBaseLevel(); + jint getLength(); + jint getLevelAt(jint); + jint getRunCount(); + jint getRunLevel(jint); + jint getRunLimit(jint); + jint getRunStart(jint); + jboolean isLeftToRight(); + jboolean isMixed(); + jboolean isRightToLeft(); + ::java::lang::String * toString(); + static void reorderVisually(JArray< jbyte > *, jint, JArray< ::java::lang::Object * > *, jint, jint); + static jboolean requiresBidi(JArray< jchar > *, jint, jint); + static const jint DIRECTION_DEFAULT_LEFT_TO_RIGHT = -2; + static const jint DIRECTION_DEFAULT_RIGHT_TO_LEFT = -1; + static const jint DIRECTION_LEFT_TO_RIGHT = 0; + static const jint DIRECTION_RIGHT_TO_LEFT = 1; +private: + static const jint LTOR = 1; + static const jint RTOL = 2; + JArray< jchar > * __attribute__((aligned(__alignof__( ::java::lang::Object)))) text; + jint textOffset; + JArray< jbyte > * embeddings; + jint embeddingOffset; + jint length; + jint flags; + jint baseEmbedding; + JArray< jbyte > * types; + JArray< jbyte > * levels; + ::java::util::ArrayList * formatterIndices; + JArray< jint > * runs; + jint resultFlags; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_Bidi__ diff --git a/libjava/java/text/BreakIterator.h b/libjava/java/text/BreakIterator.h new file mode 100644 index 000000000..2c6f90ea1 --- /dev/null +++ b/libjava/java/text/BreakIterator.h @@ -0,0 +1,59 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_BreakIterator__ +#define __java_text_BreakIterator__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class BreakIterator; + class CharacterIterator; + } + } +} + +class java::text::BreakIterator : public ::java::lang::Object +{ + +public: // actually protected + BreakIterator(); +public: + virtual ::java::lang::Object * clone(); + virtual jint current() = 0; + virtual jint first() = 0; + virtual jint following(jint) = 0; + static JArray< ::java::util::Locale * > * getAvailableLocales(); +private: + static ::java::text::BreakIterator * getInstance(::java::lang::String *, ::java::util::Locale *); +public: + static ::java::text::BreakIterator * getCharacterInstance(); + static ::java::text::BreakIterator * getCharacterInstance(::java::util::Locale *); + static ::java::text::BreakIterator * getLineInstance(); + static ::java::text::BreakIterator * getLineInstance(::java::util::Locale *); + static ::java::text::BreakIterator * getSentenceInstance(); + static ::java::text::BreakIterator * getSentenceInstance(::java::util::Locale *); + virtual ::java::text::CharacterIterator * getText() = 0; + static ::java::text::BreakIterator * getWordInstance(); + static ::java::text::BreakIterator * getWordInstance(::java::util::Locale *); + virtual jboolean isBoundary(jint); + virtual jint last() = 0; + virtual jint next() = 0; + virtual jint next(jint) = 0; + virtual jint preceding(jint); + virtual jint previous() = 0; + virtual void setText(::java::lang::String *); + virtual void setText(::java::text::CharacterIterator *) = 0; + static const jint DONE = -1; + static ::java::lang::Class class$; +}; + +#endif // __java_text_BreakIterator__ diff --git a/libjava/java/text/CharacterIterator.h b/libjava/java/text/CharacterIterator.h new file mode 100644 index 000000000..d13612ff3 --- /dev/null +++ b/libjava/java/text/CharacterIterator.h @@ -0,0 +1,39 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_CharacterIterator__ +#define __java_text_CharacterIterator__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class CharacterIterator; + } + } +} + +class java::text::CharacterIterator : public ::java::lang::Object +{ + +public: + virtual jchar current() = 0; + virtual jchar next() = 0; + virtual jchar previous() = 0; + virtual jchar first() = 0; + virtual jchar last() = 0; + virtual jint getIndex() = 0; + virtual jchar setIndex(jint) = 0; + virtual jint getBeginIndex() = 0; + virtual jint getEndIndex() = 0; + virtual ::java::lang::Object * clone() = 0; + static const jchar DONE = 65535; + static ::java::lang::Class class$; +} __attribute__ ((java_interface)); + +#endif // __java_text_CharacterIterator__ diff --git a/libjava/java/text/ChoiceFormat.h b/libjava/java/text/ChoiceFormat.h new file mode 100644 index 000000000..92852ebff --- /dev/null +++ b/libjava/java/text/ChoiceFormat.h @@ -0,0 +1,67 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_ChoiceFormat__ +#define __java_text_ChoiceFormat__ + +#pragma interface + +#include <java/text/NumberFormat.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + class CPStringBuilder; + } + } + } + namespace java + { + namespace text + { + class ChoiceFormat; + class FieldPosition; + class ParsePosition; + } + } +} + +class java::text::ChoiceFormat : public ::java::text::NumberFormat +{ + +public: + virtual void applyPattern(::java::lang::String *); + ChoiceFormat(::java::lang::String *); + ChoiceFormat(JArray< jdouble > *, JArray< ::java::lang::String * > *); + virtual jboolean equals(::java::lang::Object *); + virtual ::java::lang::StringBuffer * format(jlong, ::java::lang::StringBuffer *, ::java::text::FieldPosition *); + virtual ::java::lang::StringBuffer * format(jdouble, ::java::lang::StringBuffer *, ::java::text::FieldPosition *); + virtual JArray< ::java::lang::Object * > * getFormats(); + virtual JArray< jdouble > * getLimits(); + virtual jint hashCode(); + static jdouble nextDouble(jdouble); + static jdouble nextDouble(jdouble, jboolean); + virtual ::java::lang::Number * parse(::java::lang::String *, ::java::text::ParsePosition *); + static jdouble previousDouble(jdouble); + virtual void setChoices(JArray< jdouble > *, JArray< ::java::lang::String * > *); +private: + void quoteString(::gnu::java::lang::CPStringBuilder *, ::java::lang::String *); +public: + virtual ::java::lang::String * toPattern(); +private: + JArray< ::java::lang::String * > * __attribute__((aligned(__alignof__( ::java::text::NumberFormat)))) choiceFormats; + JArray< jdouble > * choiceLimits; + static const jint mantissaBits = 52; + static const jint exponentBits = 11; + static const jlong serialVersionUID = 1795184449645032964LL; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_ChoiceFormat__ diff --git a/libjava/java/text/CollationElementIterator.h b/libjava/java/text/CollationElementIterator.h new file mode 100644 index 000000000..a3b75de18 --- /dev/null +++ b/libjava/java/text/CollationElementIterator.h @@ -0,0 +1,59 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_CollationElementIterator__ +#define __java_text_CollationElementIterator__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class CharacterIterator; + class CollationElementIterator; + class RuleBasedCollator; + class RuleBasedCollator$CollationElement; + } + } +} + +class java::text::CollationElementIterator : public ::java::lang::Object +{ + +public: // actually package-private + CollationElementIterator(::java::text::RuleBasedCollator *, ::java::lang::String *); + CollationElementIterator(::java::text::RuleBasedCollator *, ::java::text::CharacterIterator *); + ::java::text::RuleBasedCollator$CollationElement * nextBlock(); + ::java::text::RuleBasedCollator$CollationElement * previousBlock(); +public: + jint next(); + jint previous(); + static jint primaryOrder(jint); + void reset(); + static jshort secondaryOrder(jint); + static jshort tertiaryOrder(jint); + void setText(::java::lang::String *); + void setText(::java::text::CharacterIterator *); + jint getOffset(); + void setOffset(jint); + jint getMaxExpansion(jint); + static const jint NULLORDER = -1; +public: // actually package-private + ::java::text::RuleBasedCollator * __attribute__((aligned(__alignof__( ::java::lang::Object)))) collator; + ::java::text::CharacterIterator * text; + jint index; + jint textIndex; +private: + JArray< ::java::text::RuleBasedCollator$CollationElement * > * text_decomposition; + JArray< jint > * text_indexes; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_CollationElementIterator__ diff --git a/libjava/java/text/CollationKey.h b/libjava/java/text/CollationKey.h new file mode 100644 index 000000000..ac110813f --- /dev/null +++ b/libjava/java/text/CollationKey.h @@ -0,0 +1,44 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_CollationKey__ +#define __java_text_CollationKey__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class CollationKey; + class Collator; + } + } +} + +class java::text::CollationKey : public ::java::lang::Object +{ + +public: // actually package-private + CollationKey(::java::text::Collator *, ::java::lang::String *, JArray< jbyte > *); +public: + virtual jint CollationKey$compareTo(::java::text::CollationKey *); + virtual jboolean equals(::java::lang::Object *); + virtual ::java::lang::String * getSourceString(); + virtual jint hashCode(); + virtual JArray< jbyte > * toByteArray(); + virtual jint compareTo(::java::lang::Object *); +private: + ::java::text::Collator * __attribute__((aligned(__alignof__( ::java::lang::Object)))) collator; + ::java::lang::String * originalText; + JArray< jbyte > * key; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_CollationKey__ diff --git a/libjava/java/text/Collator.h b/libjava/java/text/Collator.h new file mode 100644 index 000000000..075dcb2b1 --- /dev/null +++ b/libjava/java/text/Collator.h @@ -0,0 +1,61 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_Collator__ +#define __java_text_Collator__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class CollationKey; + class Collator; + } + } +} + +class java::text::Collator : public ::java::lang::Object +{ + +public: // actually protected + Collator(); +public: + virtual jint compare(::java::lang::String *, ::java::lang::String *) = 0; + virtual jint compare(::java::lang::Object *, ::java::lang::Object *); + virtual jboolean equals(::java::lang::Object *); + virtual jboolean equals(::java::lang::String *, ::java::lang::String *); + virtual ::java::lang::Object * clone(); + static JArray< ::java::util::Locale * > * getAvailableLocales(); + virtual ::java::text::CollationKey * getCollationKey(::java::lang::String *) = 0; + virtual jint getDecomposition(); + static ::java::text::Collator * getInstance(); + static ::java::text::Collator * getInstance(::java::util::Locale *); + virtual jint getStrength(); + virtual jint hashCode() = 0; + virtual void setDecomposition(jint); + virtual void setStrength(jint); +public: // actually package-private + virtual void decomposeCharacter(jchar, ::java::lang::StringBuffer *); +public: + static const jint PRIMARY = 0; + static const jint SECONDARY = 1; + static const jint TERTIARY = 2; + static const jint IDENTICAL = 3; + static const jint NO_DECOMPOSITION = 0; + static const jint CANONICAL_DECOMPOSITION = 1; + static const jint FULL_DECOMPOSITION = 2; +public: // actually package-private + jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) decmp; + jint strength; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_Collator__ diff --git a/libjava/java/text/Collator.java b/libjava/java/text/Collator.java new file mode 100644 index 000000000..e493182b1 --- /dev/null +++ b/libjava/java/text/Collator.java @@ -0,0 +1,419 @@ +/* Collator.java -- Perform locale dependent String comparisons. + Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2007, + 2008 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.text; + +import gnu.java.locale.LocaleHelper; + +import java.text.spi.CollatorProvider; + +import java.util.Comparator; +import java.util.Locale; +import java.util.MissingResourceException; +import java.util.ResourceBundle; +import java.util.ServiceLoader; + +/** + * This class is the abstract superclass of classes which perform + * locale dependent <code>String</code> comparisons. A caller requests + * an instance of <code>Collator</code> for a particular locale using + * the <code>getInstance()</code> static method in this class. That method + * will return a locale specific subclass of <code>Collator</code> which + * can be used to perform <code>String</code> comparisons for that locale. + * If a subclass of <code>Collator</code> cannot be located for a particular + * locale, a default instance for the current locale will be returned. + * + * In addition to setting the correct locale, there are two additional + * settings that can be adjusted to affect <code>String</code> comparisons: + * strength and decomposition. The strength value determines the level + * of signficance of character differences required for them to sort + * differently. (For example, whether or not capital letters are considered + * different from lower case letters). The decomposition value affects how + * variants of the same character are treated for sorting purposes. (For + * example, whether or not an accent is signficant or not). These settings + * are described in detail in the documentation for the methods and values + * that are related to them. + * + * @author Tom Tromey (tromey@cygnus.com) + * @author Aaron M. Renn (arenn@urbanophile.com) + * @date March 18, 1999 + */ +public abstract class Collator implements Comparator<Object>, Cloneable +{ + /** + * This constant is a strength value which indicates that only primary + * differences between characters will be considered signficant. As an + * example, two completely different English letters such as 'a' and 'b' + * are considered to have a primary difference. + */ + public static final int PRIMARY = 0; + + /** + * This constant is a strength value which indicates that only secondary + * or primary differences between characters will be considered + * significant. An example of a secondary difference between characters + * are instances of the same letter with different accented forms. + */ + public static final int SECONDARY = 1; + + /** + * This constant is a strength value which indicates that tertiary, + * secondary, and primary differences will be considered during sorting. + * An example of a tertiary difference is capitalization of a given letter. + * This is the default value for the strength setting. + */ + public static final int TERTIARY = 2; + + /** + * This constant is a strength value which indicates that any difference + * at all between character values are considered significant. + */ + public static final int IDENTICAL = 3; + + /** + * This constant indicates that accented characters won't be decomposed + * when performing comparisons. This will yield the fastest results, but + * will only work correctly in call cases for languages which do not + * use accents such as English. + */ + public static final int NO_DECOMPOSITION = 0; + + /** + * This constant indicates that only characters which are canonical variants + * in Unicode 2.0 will be decomposed prior to performing comparisons. This + * will cause accented languages to be sorted correctly. This is the + * default decomposition value. + */ + public static final int CANONICAL_DECOMPOSITION = 1; + + /** + * This constant indicates that both canonical variants and compatibility + * variants in Unicode 2.0 will be decomposed prior to performing + * comparisons. This is the slowest mode, but is required to get the + * correct sorting for certain languages with certain special formats. + */ + public static final int FULL_DECOMPOSITION = 2; + + /** + * This method initializes a new instance of <code>Collator</code> to have + * the default strength (TERTIARY) and decomposition + * (CANONICAL_DECOMPOSITION) settings. This constructor is protected and + * is for use by subclasses only. Non-subclass callers should use the + * static <code>getInstance()</code> methods of this class to instantiate + * <code>Collation</code> objects for the desired locale. + */ + protected Collator () + { + strength = TERTIARY; + decmp = CANONICAL_DECOMPOSITION; + } + + /** + * This method compares the two <code>String</code>'s and returns an + * integer indicating whether or not the first argument is less than, + * equal to, or greater than the second argument. The comparison is + * performed according to the rules of the locale for this + * <code>Collator</code> and the strength and decomposition rules in + * effect. + * + * @param source The first object to compare + * @param target The second object to compare + * + * @return A negative integer if str1 < str2, 0 if str1 == str2, or + * a positive integer if str1 > str2. + */ + public abstract int compare (String source, String target); + + /** + * This method compares the two <code>Object</code>'s and returns an + * integer indicating whether or not the first argument is less than, + * equal to, or greater than the second argument. These two objects + * must be <code>String</code>'s or an exception will be thrown. + * + * @param o1 The first object to compare + * @param o2 The second object to compare + * + * @return A negative integer if obj1 < obj2, 0 if obj1 == obj2, or + * a positive integer if obj1 > obj2. + * + * @exception ClassCastException If the arguments are not instances + * of <code>String</code>. + */ + public int compare (Object o1, Object o2) + { + return compare ((String) o1, (String) o2); + } + + /** + * This method tests the specified object for equality against this + * object. This will be true if and only if the following conditions are + * met: + * <ul> + * <li>The specified object is not <code>null</code>.</li> + * <li>The specified object is an instance of <code>Collator</code>.</li> + * <li>The specified object has the same strength and decomposition + * settings as this object.</li> + * </ul> + * + * @param obj The <code>Object</code> to test for equality against + * this object. + * + * @return <code>true</code> if the specified object is equal to + * this one, <code>false</code> otherwise. + */ + public boolean equals (Object obj) + { + if (! (obj instanceof Collator)) + return false; + Collator c = (Collator) obj; + return decmp == c.decmp && strength == c.strength; + } + + /** + * This method tests whether the specified <code>String</code>'s are equal + * according to the collation rules for the locale of this object and + * the current strength and decomposition settings. + * + * @param source The first <code>String</code> to compare + * @param target The second <code>String</code> to compare + * + * @return <code>true</code> if the two strings are equal, + * <code>false</code> otherwise. + */ + public boolean equals (String source, String target) + { + return compare (source, target) == 0; + } + + /** + * This method returns a copy of this <code>Collator</code> object. + * + * @return A duplicate of this object. + */ + public Object clone () + { + try + { + return super.clone (); + } + catch (CloneNotSupportedException _) + { + return null; + } + } + + /** + * This method returns an array of <code>Locale</code> objects which is + * the list of locales for which <code>Collator</code> objects exist. + * + * @return The list of locales for which <code>Collator</code>'s exist. + */ + public static synchronized Locale[] getAvailableLocales () + { + return LocaleHelper.getCollatorLocales(); + } + + /** + * This method transforms the specified <code>String</code> into a + * <code>CollationKey</code> for faster comparisons. This is useful when + * comparisons against a string might be performed multiple times, such + * as during a sort operation. + * + * @param source The <code>String</code> to convert. + * + * @return A <code>CollationKey</code> for the specified <code>String</code>. + */ + public abstract CollationKey getCollationKey (String source); + + /** + * This method returns the current decomposition setting for this + * object. This * will be one of NO_DECOMPOSITION, + * CANONICAL_DECOMPOSITION, or * FULL_DECOMPOSITION. See the + * documentation for those constants for an * explanation of this + * setting. + * + * @return The current decomposition setting. + */ + public synchronized int getDecomposition () + { + return decmp; + } + + /** + * This method returns an instance of <code>Collator</code> for the + * default locale. + * + * @return A <code>Collator</code> for the default locale. + */ + public static Collator getInstance () + { + return getInstance (Locale.getDefault()); + } + + /** + * This method returns an instance of <code>Collator</code> for the + * specified locale. If no <code>Collator</code> exists for the desired + * locale, the fallback procedure described in + * {@link java.util.spi.LocaleServiceProvider} is invoked. + * + * @param loc The desired locale to load a <code>Collator</code> for. + * + * @return A <code>Collator</code> for the requested locale + */ + public static Collator getInstance (Locale loc) + { + String pattern; + try + { + ResourceBundle res = + ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", + loc, ClassLoader.getSystemClassLoader()); + return new RuleBasedCollator(res.getString("collation_rules")); + } + catch (MissingResourceException x) + { + /* This means runtime support for the locale + * is not available, so we check providers. */ + } + catch (ParseException x) + { + throw (InternalError)new InternalError().initCause(x); + } + for (CollatorProvider p : ServiceLoader.load(CollatorProvider.class)) + { + for (Locale l : p.getAvailableLocales()) + { + if (l.equals(loc)) + { + Collator c = p.getInstance(loc); + if (c != null) + return c; + break; + } + } + } + if (loc.equals(Locale.ROOT)) + { + try + { + return new RuleBasedCollator("<0<1<2<3<4<5<6<7<8<9<A,a<b,B<c," + + "C<d,D<e,E<f,F<g,G<h,H<i,I<j,J<k,K" + + "<l,L<m,M<n,N<o,O<p,P<q,Q<r,R<s,S<t,"+ + "T<u,U<v,V<w,W<x,X<y,Y<z,Z"); + } + catch (ParseException x) + { + throw (InternalError)new InternalError().initCause(x); + } + } + return getInstance(LocaleHelper.getFallbackLocale(loc)); + } + + /** + * This method returns the current strength setting for this object. This + * will be one of PRIMARY, SECONDARY, TERTIARY, or IDENTICAL. See the + * documentation for those constants for an explanation of this setting. + * + * @return The current strength setting. + */ + public synchronized int getStrength () + { + return strength; + } + + /** + * This method returns a hash code value for this object. + * + * @return A hash value for this object. + */ + public abstract int hashCode (); + + /** + * This method sets the decomposition setting for this object to the + * specified value. This must be one of NO_DECOMPOSITION, + * CANONICAL_DECOMPOSITION, or FULL_DECOMPOSITION. Otherwise an + * exception will be thrown. See the documentation for those + * contants for an explanation of this setting. + * + * @param mode The new decomposition setting. + * + * @exception IllegalArgumentException If the requested + * decomposition setting is not valid. + */ + public synchronized void setDecomposition (int mode) + { + if (mode != NO_DECOMPOSITION + && mode != CANONICAL_DECOMPOSITION + && mode != FULL_DECOMPOSITION) + throw new IllegalArgumentException (); + decmp = mode; + } + + /** + * This method sets the strength setting for this object to the specified + * value. This must be one of PRIMARY, SECONDARY, TERTIARY, or IDENTICAL. + * Otherwise an exception is thrown. See the documentation for these + * constants for an explanation of this setting. + * + * @param strength The new strength setting. + * + * @exception IllegalArgumentException If the requested strength + * setting value is not valid. + */ + public synchronized void setStrength (int strength) + { + if (strength != PRIMARY && strength != SECONDARY + && strength != TERTIARY && strength != IDENTICAL) + throw new IllegalArgumentException (); + this.strength = strength; + } + + // Decompose a single character and append results to the buffer. + native final void decomposeCharacter (char c, StringBuffer buf); + + /** + * This is the current collation decomposition setting. + */ + int decmp; + + /** + * This is the current collation strength setting. + */ + int strength; +} diff --git a/libjava/java/text/DateFormat$Field.h b/libjava/java/text/DateFormat$Field.h new file mode 100644 index 000000000..47480476f --- /dev/null +++ b/libjava/java/text/DateFormat$Field.h @@ -0,0 +1,63 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_DateFormat$Field__ +#define __java_text_DateFormat$Field__ + +#pragma interface + +#include <java/text/Format$Field.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class DateFormat$Field; + } + } +} + +class java::text::DateFormat$Field : public ::java::text::Format$Field +{ + + DateFormat$Field(); +public: // actually protected + DateFormat$Field(::java::lang::String *, jint); +public: + virtual jint getCalendarField(); + static ::java::text::DateFormat$Field * ofCalendarField(jint); +public: // actually protected + virtual ::java::lang::Object * readResolve(); +public: // actually package-private + static const jlong serialVersionUID = 7441350119349544720LL; +private: + jint __attribute__((aligned(__alignof__( ::java::text::Format$Field)))) calendarField; +public: + static ::java::text::DateFormat$Field * ERA; + static ::java::text::DateFormat$Field * YEAR; + static ::java::text::DateFormat$Field * MONTH; + static ::java::text::DateFormat$Field * DAY_OF_MONTH; + static ::java::text::DateFormat$Field * HOUR_OF_DAY1; + static ::java::text::DateFormat$Field * HOUR_OF_DAY0; + static ::java::text::DateFormat$Field * MINUTE; + static ::java::text::DateFormat$Field * SECOND; + static ::java::text::DateFormat$Field * MILLISECOND; + static ::java::text::DateFormat$Field * DAY_OF_WEEK; + static ::java::text::DateFormat$Field * DAY_OF_YEAR; + static ::java::text::DateFormat$Field * DAY_OF_WEEK_IN_MONTH; + static ::java::text::DateFormat$Field * WEEK_OF_YEAR; + static ::java::text::DateFormat$Field * WEEK_OF_MONTH; + static ::java::text::DateFormat$Field * AM_PM; + static ::java::text::DateFormat$Field * HOUR1; + static ::java::text::DateFormat$Field * HOUR0; + static ::java::text::DateFormat$Field * TIME_ZONE; +public: // actually package-private + static JArray< ::java::text::DateFormat$Field * > * allFields; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_DateFormat$Field__ diff --git a/libjava/java/text/DateFormat.h b/libjava/java/text/DateFormat.h new file mode 100644 index 000000000..5f5241fcb --- /dev/null +++ b/libjava/java/text/DateFormat.h @@ -0,0 +1,97 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_DateFormat__ +#define __java_text_DateFormat__ + +#pragma interface + +#include <java/text/Format.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class DateFormat; + class FieldPosition; + class NumberFormat; + class ParsePosition; + } + } +} + +class java::text::DateFormat : public ::java::text::Format +{ + +public: // actually protected + DateFormat(); +public: + virtual jboolean equals(::java::lang::Object *); + virtual ::java::lang::Object * clone(); + virtual ::java::lang::StringBuffer * format(::java::lang::Object *, ::java::lang::StringBuffer *, ::java::text::FieldPosition *); + virtual ::java::lang::String * format(::java::util::Date *); + virtual ::java::lang::StringBuffer * format(::java::util::Date *, ::java::lang::StringBuffer *, ::java::text::FieldPosition *) = 0; + static JArray< ::java::util::Locale * > * getAvailableLocales(); + virtual ::java::util::Calendar * getCalendar(); +private: + static ::java::text::DateFormat * computeInstance(jint, ::java::util::Locale *, jboolean, jboolean); + static ::java::text::DateFormat * computeInstance(jint, jint, ::java::util::Locale *, jboolean, jboolean); + static ::java::text::DateFormat * computeDefault(jint, jint, jboolean, jboolean); +public: + static ::java::text::DateFormat * getDateInstance(); + static ::java::text::DateFormat * getDateInstance(jint); + static ::java::text::DateFormat * getDateInstance(jint, ::java::util::Locale *); + static ::java::text::DateFormat * getDateTimeInstance(); + static ::java::text::DateFormat * getDateTimeInstance(jint, jint); + static ::java::text::DateFormat * getDateTimeInstance(jint, jint, ::java::util::Locale *); + static ::java::text::DateFormat * getInstance(); + virtual ::java::text::NumberFormat * getNumberFormat(); + static ::java::text::DateFormat * getTimeInstance(); + static ::java::text::DateFormat * getTimeInstance(jint); + static ::java::text::DateFormat * getTimeInstance(jint, ::java::util::Locale *); + virtual ::java::util::TimeZone * getTimeZone(); + virtual jint hashCode(); + virtual jboolean isLenient(); + virtual ::java::util::Date * parse(::java::lang::String *); + virtual ::java::util::Date * parse(::java::lang::String *, ::java::text::ParsePosition *) = 0; + virtual ::java::lang::Object * parseObject(::java::lang::String *, ::java::text::ParsePosition *); + virtual void setCalendar(::java::util::Calendar *); + virtual void setLenient(jboolean); + virtual void setNumberFormat(::java::text::NumberFormat *); + virtual void setTimeZone(::java::util::TimeZone *); +private: + static const jlong serialVersionUID = 7218322306649953788LL; +public: // actually protected + ::java::util::Calendar * __attribute__((aligned(__alignof__( ::java::text::Format)))) calendar; + ::java::text::NumberFormat * numberFormat; +public: + static const jint FULL = 0; + static const jint LONG = 1; + static const jint MEDIUM = 2; + static const jint SHORT = 3; + static const jint DEFAULT = 2; + static const jint ERA_FIELD = 0; + static const jint YEAR_FIELD = 1; + static const jint MONTH_FIELD = 2; + static const jint DATE_FIELD = 3; + static const jint HOUR_OF_DAY1_FIELD = 4; + static const jint HOUR_OF_DAY0_FIELD = 5; + static const jint MINUTE_FIELD = 6; + static const jint SECOND_FIELD = 7; + static const jint MILLISECOND_FIELD = 8; + static const jint DAY_OF_WEEK_FIELD = 9; + static const jint DAY_OF_YEAR_FIELD = 10; + static const jint DAY_OF_WEEK_IN_MONTH_FIELD = 11; + static const jint WEEK_OF_YEAR_FIELD = 12; + static const jint WEEK_OF_MONTH_FIELD = 13; + static const jint AM_PM_FIELD = 14; + static const jint HOUR1_FIELD = 15; + static const jint HOUR0_FIELD = 16; + static const jint TIMEZONE_FIELD = 17; + static ::java::lang::Class class$; +}; + +#endif // __java_text_DateFormat__ diff --git a/libjava/java/text/DateFormatSymbols.h b/libjava/java/text/DateFormatSymbols.h new file mode 100644 index 000000000..b5cce7f5d --- /dev/null +++ b/libjava/java/text/DateFormatSymbols.h @@ -0,0 +1,80 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_DateFormatSymbols__ +#define __java_text_DateFormatSymbols__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class DateFormatSymbols; + } + } +} + +class java::text::DateFormatSymbols : public ::java::lang::Object +{ + + static JArray< ::java::lang::String * > * getStringArray(::java::util::ResourceBundle *, ::java::lang::String *); + JArray< JArray< ::java::lang::String * > * > * getZoneStrings(::java::util::ResourceBundle *, ::java::util::Locale *); + JArray< ::java::lang::String * > * formatsForKey(::java::util::ResourceBundle *, ::java::lang::String *); +public: + DateFormatSymbols(::java::util::Locale *); + DateFormatSymbols(); + virtual JArray< ::java::lang::String * > * getAmPmStrings(); + virtual JArray< ::java::lang::String * > * getEras(); + virtual ::java::lang::String * getLocalPatternChars(); + virtual JArray< ::java::lang::String * > * getMonths(); + virtual JArray< ::java::lang::String * > * getShortMonths(); + virtual JArray< ::java::lang::String * > * getShortWeekdays(); + virtual JArray< ::java::lang::String * > * getWeekdays(); + virtual JArray< JArray< ::java::lang::String * > * > * getZoneStrings(); + virtual void setAmPmStrings(JArray< ::java::lang::String * > *); + virtual void setEras(JArray< ::java::lang::String * > *); + virtual void setLocalPatternChars(::java::lang::String *); + virtual void setMonths(JArray< ::java::lang::String * > *); + virtual void setShortMonths(JArray< ::java::lang::String * > *); + virtual void setShortWeekdays(JArray< ::java::lang::String * > *); + virtual void setWeekdays(JArray< ::java::lang::String * > *); + virtual void setZoneStrings(JArray< JArray< ::java::lang::String * > * > *); +private: + static jboolean equals(::java::lang::Object *, ::java::lang::Object *); + static jint hashCode(::java::lang::Object *); +public: + virtual jboolean equals(::java::lang::Object *); + virtual ::java::lang::Object * clone(); + virtual jint hashCode(); + static ::java::text::DateFormatSymbols * getInstance(); + static ::java::text::DateFormatSymbols * getInstance(::java::util::Locale *); +public: // actually package-private + JArray< ::java::lang::String * > * __attribute__((aligned(__alignof__( ::java::lang::Object)))) ampms; + JArray< ::java::lang::String * > * eras; +private: + ::java::lang::String * localPatternChars; +public: // actually package-private + JArray< ::java::lang::String * > * months; + JArray< ::java::lang::String * > * shortMonths; + JArray< ::java::lang::String * > * shortWeekdays; + JArray< ::java::lang::String * > * weekdays; +private: + static ::java::util::Properties * properties; + JArray< JArray< ::java::lang::String * > * > * runtimeZoneStrings; + JArray< JArray< ::java::lang::String * > * > * zoneStrings; + static const jlong serialVersionUID = -5987973545549424702LL; + static JArray< ::java::lang::String * > * formatPrefixes; +public: // actually package-private + JArray< ::java::lang::String * > * dateFormats; + JArray< ::java::lang::String * > * timeFormats; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_DateFormatSymbols__ diff --git a/libjava/java/text/DecimalFormat.h b/libjava/java/text/DecimalFormat.h new file mode 100644 index 000000000..a3172d742 --- /dev/null +++ b/libjava/java/text/DecimalFormat.h @@ -0,0 +1,130 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_DecimalFormat__ +#define __java_text_DecimalFormat__ + +#pragma interface + +#include <java/text/NumberFormat.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + class CPStringBuilder; + } + } + } + namespace java + { + namespace math + { + class BigDecimal; + } + namespace text + { + class AttributedCharacterIterator; + class DecimalFormat; + class DecimalFormatSymbols; + class FieldPosition; + class NumberFormat$Field; + class ParsePosition; + } + } +} + +class java::text::DecimalFormat : public ::java::text::NumberFormat +{ + +public: + DecimalFormat(); + DecimalFormat(::java::lang::String *); + DecimalFormat(::java::lang::String *, ::java::text::DecimalFormatSymbols *); + virtual void applyLocalizedPattern(::java::lang::String *); + virtual void applyPattern(::java::lang::String *); + virtual ::java::lang::Object * clone(); + virtual jboolean equals(::java::lang::Object *); + virtual jint hashCode(); + virtual ::java::lang::StringBuffer * format(::java::lang::Object *, ::java::lang::StringBuffer *, ::java::text::FieldPosition *); + virtual ::java::lang::StringBuffer * format(jdouble, ::java::lang::StringBuffer *, ::java::text::FieldPosition *); + virtual ::java::lang::StringBuffer * format(jlong, ::java::lang::StringBuffer *, ::java::text::FieldPosition *); + virtual ::java::text::AttributedCharacterIterator * formatToCharacterIterator(::java::lang::Object *); + virtual ::java::util::Currency * getCurrency(); + virtual ::java::text::DecimalFormatSymbols * getDecimalFormatSymbols(); + virtual jint getGroupingSize(); + virtual jint getMultiplier(); + virtual ::java::lang::String * getNegativePrefix(); + virtual ::java::lang::String * getNegativeSuffix(); + virtual ::java::lang::String * getPositivePrefix(); + virtual ::java::lang::String * getPositiveSuffix(); + virtual jboolean isDecimalSeparatorAlwaysShown(); + virtual void setParseBigDecimal(jboolean); + virtual jboolean isParseBigDecimal(); + virtual ::java::lang::Number * parse(::java::lang::String *, ::java::text::ParsePosition *); + virtual void setCurrency(::java::util::Currency *); + virtual void setDecimalFormatSymbols(::java::text::DecimalFormatSymbols *); + virtual void setDecimalSeparatorAlwaysShown(jboolean); + virtual void setGroupingSize(jint); + virtual void setMaximumIntegerDigits(jint); + virtual void setMinimumIntegerDigits(jint); + virtual void setMaximumFractionDigits(jint); + virtual void setMinimumFractionDigits(jint); + virtual void setMultiplier(jint); + virtual void setNegativePrefix(::java::lang::String *); + virtual void setNegativeSuffix(::java::lang::String *); + virtual void setPositivePrefix(::java::lang::String *); + virtual void setPositiveSuffix(::java::lang::String *); + virtual ::java::lang::String * toLocalizedPattern(); + virtual ::java::lang::String * toPattern(); +private: + jboolean equals(::java::lang::String *, ::java::lang::String *); + ::java::lang::String * patternChars(::java::text::DecimalFormatSymbols *); + ::gnu::java::lang::CPStringBuilder * quoteFix(::java::lang::String *, ::java::lang::String *); + ::java::lang::String * computePattern(::java::text::DecimalFormatSymbols *); + void applyPatternWithSymbols(::java::lang::String *, ::java::text::DecimalFormatSymbols *); + jint scanFix(::java::lang::String *, ::java::text::DecimalFormatSymbols *, jint, jboolean); + jint scanNumberInteger(::java::lang::String *, ::java::text::DecimalFormatSymbols *, jint); + jint scanFractionalPortion(::java::lang::String *, ::java::text::DecimalFormatSymbols *, jint); + jint scanExponent(::java::lang::String *, ::java::text::DecimalFormatSymbols *, jint); + void scanNegativePattern(::java::lang::String *, ::java::text::DecimalFormatSymbols *, jint); + void formatInternal(::java::math::BigDecimal *, jboolean, ::java::lang::StringBuffer *, ::java::text::FieldPosition *); + void handleFractionalPart(::java::lang::StringBuffer *, ::java::lang::String *, ::java::text::FieldPosition *, jboolean); + void appendZero(::java::lang::StringBuffer *, jint, jint); + void appendDigit(::java::lang::String *, ::java::lang::StringBuffer *, jboolean); + jlong getExponent(::java::math::BigDecimal *); + ::java::lang::String * adjustTrailingZeros(::java::lang::String *, jint); + void addAttribute(::java::text::NumberFormat$Field *, jint, jint); + void setDefaultValues(); + static const jlong serialVersionUID = 864413376551465018LL; + static const jint DEFAULT_INTEGER_DIGITS = 309; + static const jint DEFAULT_FRACTION_DIGITS = 340; + static ::java::text::DecimalFormatSymbols * nonLocalizedSymbols; + jboolean __attribute__((aligned(__alignof__( ::java::text::NumberFormat)))) parseBigDecimal; + jboolean useCurrencySeparator; + jboolean decimalSeparatorAlwaysShown; + jboolean showDecimalSeparator; + jboolean groupingSeparatorInPattern; + jbyte groupingSize; + jbyte minExponentDigits; + jint exponentRound; + jint multiplier; + jint negativePatternMultiplier; + ::java::lang::String * negativePrefix; + ::java::lang::String * negativeSuffix; + ::java::lang::String * positivePrefix; + ::java::lang::String * positiveSuffix; + ::java::text::DecimalFormatSymbols * symbols; + jboolean useExponentialNotation; + jint maxIntegerDigitsExponent; + jboolean hasNegativePrefix; + jboolean hasFractionalPattern; + ::java::util::ArrayList * attributes; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_DecimalFormat__ diff --git a/libjava/java/text/DecimalFormatSymbols.h b/libjava/java/text/DecimalFormatSymbols.h new file mode 100644 index 000000000..8d2937757 --- /dev/null +++ b/libjava/java/text/DecimalFormatSymbols.h @@ -0,0 +1,96 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_DecimalFormatSymbols__ +#define __java_text_DecimalFormatSymbols__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class DecimalFormatSymbols; + } + } +} + +class java::text::DecimalFormatSymbols : public ::java::lang::Object +{ + +public: + virtual ::java::lang::Object * clone(); + DecimalFormatSymbols(); +private: + ::java::lang::String * safeGetString(::java::util::ResourceBundle *, ::java::lang::String *, ::java::lang::String *); + jchar safeGetChar(::java::util::ResourceBundle *, ::java::lang::String *, jchar); +public: + DecimalFormatSymbols(::java::util::Locale *); + virtual jboolean equals(::java::lang::Object *); + virtual ::java::util::Currency * getCurrency(); + virtual ::java::lang::String * getCurrencySymbol(); + virtual jchar getDecimalSeparator(); + virtual jchar getDigit(); +public: // actually package-private + virtual jchar getExponential(); +public: + virtual jchar getGroupingSeparator(); + virtual ::java::lang::String * getInfinity(); + virtual ::java::lang::String * getInternationalCurrencySymbol(); + virtual jchar getMinusSign(); + virtual jchar getMonetaryDecimalSeparator(); + virtual ::java::lang::String * getNaN(); + virtual jchar getPatternSeparator(); + virtual jchar getPercent(); + virtual jchar getPerMill(); + virtual jchar getZeroDigit(); + virtual jint hashCode(); + virtual void setCurrency(::java::util::Currency *); + virtual void setCurrencySymbol(::java::lang::String *); + virtual void setDecimalSeparator(jchar); + virtual void setDigit(jchar); +public: // actually package-private + virtual void setExponential(jchar); +public: + virtual void setGroupingSeparator(jchar); + virtual void setInfinity(::java::lang::String *); + virtual void setInternationalCurrencySymbol(::java::lang::String *); + virtual void setMinusSign(jchar); + virtual void setMonetaryDecimalSeparator(jchar); + virtual void setNaN(::java::lang::String *); + virtual void setPatternSeparator(jchar); + virtual void setPercent(jchar); + virtual void setPerMill(jchar); + virtual void setZeroDigit(jchar); +private: + void readObject(::java::io::ObjectInputStream *); +public: + static ::java::text::DecimalFormatSymbols * getInstance(); + static ::java::text::DecimalFormatSymbols * getInstance(::java::util::Locale *); +private: + ::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) currencySymbol; + jchar decimalSeparator; + jchar digit; + jchar exponential; + jchar groupingSeparator; + ::java::lang::String * infinity; + ::java::lang::String * intlCurrencySymbol; + jchar minusSign; + jchar monetarySeparator; + ::java::lang::String * NaN; + jchar patternSeparator; + jchar percent; + jchar perMill; + jint serialVersionOnStream; + jchar zeroDigit; + ::java::util::Locale * locale; + ::java::util::Currency * currency; + static const jlong serialVersionUID = 5772796243397350300LL; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_DecimalFormatSymbols__ diff --git a/libjava/java/text/FieldPosition.h b/libjava/java/text/FieldPosition.h new file mode 100644 index 000000000..d61f9115f --- /dev/null +++ b/libjava/java/text/FieldPosition.h @@ -0,0 +1,47 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_FieldPosition__ +#define __java_text_FieldPosition__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class FieldPosition; + class Format$Field; + } + } +} + +class java::text::FieldPosition : public ::java::lang::Object +{ + +public: + FieldPosition(::java::text::Format$Field *); + FieldPosition(::java::text::Format$Field *, jint); + FieldPosition(jint); + virtual jint getField(); + virtual ::java::text::Format$Field * getFieldAttribute(); + virtual jint getBeginIndex(); + virtual void setBeginIndex(jint); + virtual jint getEndIndex(); + virtual void setEndIndex(jint); + virtual jboolean equals(::java::lang::Object *); + virtual jint hashCode(); + virtual ::java::lang::String * toString(); +private: + jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) field_id; + jint begin; + jint end; + ::java::text::Format$Field * field_attribute; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_FieldPosition__ diff --git a/libjava/java/text/Format$Field.h b/libjava/java/text/Format$Field.h new file mode 100644 index 000000000..197dd7dce --- /dev/null +++ b/libjava/java/text/Format$Field.h @@ -0,0 +1,32 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_Format$Field__ +#define __java_text_Format$Field__ + +#pragma interface + +#include <java/text/AttributedCharacterIterator$Attribute.h> +extern "Java" +{ + namespace java + { + namespace text + { + class Format$Field; + } + } +} + +class java::text::Format$Field : public ::java::text::AttributedCharacterIterator$Attribute +{ + +public: // actually protected + Format$Field(::java::lang::String *); +public: // actually package-private + static const jlong serialVersionUID = 276966692217360283LL; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_Format$Field__ diff --git a/libjava/java/text/Format.h b/libjava/java/text/Format.h new file mode 100644 index 000000000..a0b6d515d --- /dev/null +++ b/libjava/java/text/Format.h @@ -0,0 +1,42 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_Format__ +#define __java_text_Format__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class AttributedCharacterIterator; + class FieldPosition; + class Format; + class ParsePosition; + } + } +} + +class java::text::Format : public ::java::lang::Object +{ + +public: // actually protected + Format(); +public: + virtual ::java::lang::String * format(::java::lang::Object *); + virtual ::java::lang::StringBuffer * format(::java::lang::Object *, ::java::lang::StringBuffer *, ::java::text::FieldPosition *) = 0; + virtual ::java::lang::Object * parseObject(::java::lang::String *); + virtual ::java::lang::Object * parseObject(::java::lang::String *, ::java::text::ParsePosition *) = 0; + virtual ::java::text::AttributedCharacterIterator * formatToCharacterIterator(::java::lang::Object *); + virtual ::java::lang::Object * clone(); +public: // actually package-private + static const jlong serialVersionUID = -299282585814624189LL; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_Format__ diff --git a/libjava/java/text/MessageFormat$Field.h b/libjava/java/text/MessageFormat$Field.h new file mode 100644 index 000000000..78a9bebba --- /dev/null +++ b/libjava/java/text/MessageFormat$Field.h @@ -0,0 +1,35 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_MessageFormat$Field__ +#define __java_text_MessageFormat$Field__ + +#pragma interface + +#include <java/text/Format$Field.h> +extern "Java" +{ + namespace java + { + namespace text + { + class MessageFormat$Field; + } + } +} + +class java::text::MessageFormat$Field : public ::java::text::Format$Field +{ + + MessageFormat$Field(); +public: // actually protected + MessageFormat$Field(::java::lang::String *); + virtual ::java::lang::Object * readResolve(); +public: // actually package-private + static const jlong serialVersionUID = 7899943957617360810LL; +public: + static ::java::text::MessageFormat$Field * ARGUMENT; + static ::java::lang::Class class$; +}; + +#endif // __java_text_MessageFormat$Field__ diff --git a/libjava/java/text/MessageFormat$MessageFormatElement.h b/libjava/java/text/MessageFormat$MessageFormatElement.h new file mode 100644 index 000000000..9a95f1f7f --- /dev/null +++ b/libjava/java/text/MessageFormat$MessageFormatElement.h @@ -0,0 +1,40 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_MessageFormat$MessageFormatElement__ +#define __java_text_MessageFormat$MessageFormatElement__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class Format; + class MessageFormat$MessageFormatElement; + } + } +} + +class java::text::MessageFormat$MessageFormatElement : public ::java::lang::Object +{ + + MessageFormat$MessageFormatElement(); +public: // actually package-private + void setLocale(::java::util::Locale *); + MessageFormat$MessageFormatElement(::java::text::MessageFormat$MessageFormatElement *); + jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) argNumber; + ::java::text::Format * setFormat; + ::java::text::Format * format; + ::java::lang::Class * formatClass; + ::java::lang::String * type; + ::java::lang::String * style; + ::java::lang::String * trailer; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_MessageFormat$MessageFormatElement__ diff --git a/libjava/java/text/MessageFormat.h b/libjava/java/text/MessageFormat.h new file mode 100644 index 000000000..961b09541 --- /dev/null +++ b/libjava/java/text/MessageFormat.h @@ -0,0 +1,87 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_MessageFormat__ +#define __java_text_MessageFormat__ + +#pragma interface + +#include <java/text/Format.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + class CPStringBuilder; + } + namespace text + { + class FormatCharacterIterator; + } + } + } + namespace java + { + namespace text + { + class AttributedCharacterIterator; + class FieldPosition; + class Format; + class MessageFormat; + class MessageFormat$MessageFormatElement; + class ParsePosition; + } + } +} + +class java::text::MessageFormat : public ::java::text::Format +{ + + static jint scanString(::java::lang::String *, jint, ::gnu::java::lang::CPStringBuilder *); + static jint scanFormatElement(::java::lang::String *, jint, ::gnu::java::lang::CPStringBuilder *, jchar); + static jint scanFormat(::java::lang::String *, jint, ::gnu::java::lang::CPStringBuilder *, ::java::util::List *, ::java::util::Locale *); +public: + virtual void applyPattern(::java::lang::String *); + virtual ::java::lang::Object * clone(); + virtual jboolean equals(::java::lang::Object *); + virtual ::java::text::AttributedCharacterIterator * formatToCharacterIterator(::java::lang::Object *); + static ::java::lang::String * format(::java::lang::String *, JArray< ::java::lang::Object * > *); + virtual ::java::lang::StringBuffer * format(JArray< ::java::lang::Object * > *, ::java::lang::StringBuffer *, ::java::text::FieldPosition *); +private: + ::java::lang::StringBuffer * formatInternal(JArray< ::java::lang::Object * > *, ::java::lang::StringBuffer *, ::java::text::FieldPosition *, ::gnu::java::text::FormatCharacterIterator *); +public: + virtual ::java::lang::StringBuffer * format(::java::lang::Object *, ::java::lang::StringBuffer *, ::java::text::FieldPosition *); + virtual JArray< ::java::text::Format * > * getFormats(); + virtual ::java::util::Locale * getLocale(); + virtual jint hashCode(); +private: + MessageFormat(); +public: + MessageFormat(::java::lang::String *); + MessageFormat(::java::lang::String *, ::java::util::Locale *); + virtual JArray< ::java::lang::Object * > * parse(::java::lang::String *, ::java::text::ParsePosition *); + virtual JArray< ::java::lang::Object * > * parse(::java::lang::String *); + virtual ::java::lang::Object * parseObject(::java::lang::String *, ::java::text::ParsePosition *); + virtual void setFormat(jint, ::java::text::Format *); + virtual void setFormats(JArray< ::java::text::Format * > *); + virtual void setLocale(::java::util::Locale *); + virtual ::java::lang::String * toPattern(); + virtual JArray< ::java::text::Format * > * getFormatsByArgumentIndex(); + virtual void setFormatByArgumentIndex(jint, ::java::text::Format *); + virtual void setFormatsByArgumentIndex(JArray< ::java::text::Format * > *); +private: + static const jlong serialVersionUID = 6479157306784022952LL; + ::java::lang::String * __attribute__((aligned(__alignof__( ::java::text::Format)))) pattern; + ::java::util::Locale * locale; + JArray< ::java::text::MessageFormat$MessageFormatElement * > * elements; + ::java::lang::String * leader; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_MessageFormat__ diff --git a/libjava/java/text/NumberFormat$Field.h b/libjava/java/text/NumberFormat$Field.h new file mode 100644 index 000000000..6b72af0a4 --- /dev/null +++ b/libjava/java/text/NumberFormat$Field.h @@ -0,0 +1,50 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_NumberFormat$Field__ +#define __java_text_NumberFormat$Field__ + +#pragma interface + +#include <java/text/Format$Field.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class NumberFormat$Field; + } + } +} + +class java::text::NumberFormat$Field : public ::java::text::Format$Field +{ + + NumberFormat$Field(); +public: // actually protected + NumberFormat$Field(::java::lang::String *); + virtual ::java::lang::Object * readResolve(); +public: // actually package-private + static const jlong serialVersionUID = 7494728892700160890LL; +public: + static ::java::text::NumberFormat$Field * INTEGER; + static ::java::text::NumberFormat$Field * FRACTION; + static ::java::text::NumberFormat$Field * EXPONENT; + static ::java::text::NumberFormat$Field * DECIMAL_SEPARATOR; + static ::java::text::NumberFormat$Field * SIGN; + static ::java::text::NumberFormat$Field * GROUPING_SEPARATOR; + static ::java::text::NumberFormat$Field * EXPONENT_SYMBOL; + static ::java::text::NumberFormat$Field * PERCENT; + static ::java::text::NumberFormat$Field * PERMILLE; + static ::java::text::NumberFormat$Field * CURRENCY; + static ::java::text::NumberFormat$Field * EXPONENT_SIGN; +private: + static JArray< ::java::text::NumberFormat$Field * > * allFields; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_NumberFormat$Field__ diff --git a/libjava/java/text/NumberFormat.h b/libjava/java/text/NumberFormat.h new file mode 100644 index 000000000..0b480da4a --- /dev/null +++ b/libjava/java/text/NumberFormat.h @@ -0,0 +1,102 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_NumberFormat__ +#define __java_text_NumberFormat__ + +#pragma interface + +#include <java/text/Format.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class FieldPosition; + class NumberFormat; + class ParsePosition; + } + } +} + +class java::text::NumberFormat : public ::java::text::Format +{ + +public: + virtual ::java::lang::String * format(jlong); + virtual ::java::lang::StringBuffer * format(::java::lang::Object *, ::java::lang::StringBuffer *, ::java::text::FieldPosition *); + virtual ::java::lang::StringBuffer * format(jdouble, ::java::lang::StringBuffer *, ::java::text::FieldPosition *) = 0; + virtual ::java::lang::StringBuffer * format(jlong, ::java::lang::StringBuffer *, ::java::text::FieldPosition *) = 0; + virtual jboolean equals(::java::lang::Object *); + static JArray< ::java::util::Locale * > * getAvailableLocales(); +private: + static ::java::text::NumberFormat * computeInstance(::java::util::Locale *, ::java::lang::String *, ::java::lang::String *); +public: + static ::java::text::NumberFormat * getCurrencyInstance(); + static ::java::text::NumberFormat * getCurrencyInstance(::java::util::Locale *); + static ::java::text::NumberFormat * getInstance(); + static ::java::text::NumberFormat * getInstance(::java::util::Locale *); + virtual jint getMaximumFractionDigits(); + virtual jint getMaximumIntegerDigits(); + virtual jint getMinimumFractionDigits(); + virtual jint getMinimumIntegerDigits(); + static ::java::text::NumberFormat * getNumberInstance(); + static ::java::text::NumberFormat * getNumberInstance(::java::util::Locale *); + static ::java::text::NumberFormat * getIntegerInstance(); + static ::java::text::NumberFormat * getIntegerInstance(::java::util::Locale *); + static ::java::text::NumberFormat * getPercentInstance(); + static ::java::text::NumberFormat * getPercentInstance(::java::util::Locale *); + virtual jint hashCode(); + virtual jboolean isGroupingUsed(); + virtual jboolean isParseIntegerOnly(); +public: // actually protected + NumberFormat(); +public: + virtual ::java::lang::Number * parse(::java::lang::String *, ::java::text::ParsePosition *) = 0; + virtual ::java::lang::Number * parse(::java::lang::String *); + virtual ::java::lang::Object * parseObject(::java::lang::String *, ::java::text::ParsePosition *); + virtual void setGroupingUsed(jboolean); + virtual void setMaximumFractionDigits(jint); + virtual void setMaximumIntegerDigits(jint); + virtual void setMinimumFractionDigits(jint); + virtual void setMinimumIntegerDigits(jint); + virtual void setParseIntegerOnly(jboolean); + virtual ::java::lang::String * format(jdouble); +private: + void readObject(::java::io::ObjectInputStream *); + void writeObject(::java::io::ObjectOutputStream *); +public: + virtual ::java::util::Currency * getCurrency(); + virtual void setCurrency(::java::util::Currency *); + static const jint INTEGER_FIELD = 0; + static const jint FRACTION_FIELD = 1; +public: // actually package-private + jboolean __attribute__((aligned(__alignof__( ::java::text::Format)))) groupingUsed; + jint maximumFractionDigits; +private: + jbyte maxFractionDigits; +public: // actually package-private + jint maximumIntegerDigits; +private: + jbyte maxIntegerDigits; +public: // actually package-private + jint minimumFractionDigits; +private: + jbyte minFractionDigits; +public: // actually package-private + jint minimumIntegerDigits; +private: + jbyte minIntegerDigits; +public: // actually package-private + jboolean parseIntegerOnly; +private: + jint serialVersionOnStream; + static const jlong serialVersionUID = -2308460125733713944LL; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_NumberFormat__ diff --git a/libjava/java/text/ParseException.h b/libjava/java/text/ParseException.h new file mode 100644 index 000000000..e8b314fa2 --- /dev/null +++ b/libjava/java/text/ParseException.h @@ -0,0 +1,34 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_ParseException__ +#define __java_text_ParseException__ + +#pragma interface + +#include <java/lang/Exception.h> +extern "Java" +{ + namespace java + { + namespace text + { + class ParseException; + } + } +} + +class java::text::ParseException : public ::java::lang::Exception +{ + +public: + ParseException(::java::lang::String *, jint); + virtual jint getErrorOffset(); +private: + static const jlong serialVersionUID = 2703218443322787634LL; + jint __attribute__((aligned(__alignof__( ::java::lang::Exception)))) errorOffset; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_ParseException__ diff --git a/libjava/java/text/ParsePosition.h b/libjava/java/text/ParsePosition.h new file mode 100644 index 000000000..4f7970cea --- /dev/null +++ b/libjava/java/text/ParsePosition.h @@ -0,0 +1,40 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_ParsePosition__ +#define __java_text_ParsePosition__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class ParsePosition; + } + } +} + +class java::text::ParsePosition : public ::java::lang::Object +{ + +public: + ParsePosition(jint); + virtual jint getIndex(); + virtual void setIndex(jint); + virtual jint getErrorIndex(); + virtual void setErrorIndex(jint); + virtual jboolean equals(::java::lang::Object *); + virtual jint hashCode(); + virtual ::java::lang::String * toString(); +private: + jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) index; + jint error_index; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_ParsePosition__ diff --git a/libjava/java/text/RuleBasedCollator$CollationElement.h b/libjava/java/text/RuleBasedCollator$CollationElement.h new file mode 100644 index 000000000..8baa2a46d --- /dev/null +++ b/libjava/java/text/RuleBasedCollator$CollationElement.h @@ -0,0 +1,38 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_RuleBasedCollator$CollationElement__ +#define __java_text_RuleBasedCollator$CollationElement__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class RuleBasedCollator$CollationElement; + } + } +} + +class java::text::RuleBasedCollator$CollationElement : public ::java::lang::Object +{ + +public: // actually package-private + RuleBasedCollator$CollationElement(::java::lang::String *, jint, jshort, jshort, jshort, ::java::lang::String *, jboolean); + jint getValue(); + ::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) key; + jint primary; + jshort secondary; + jshort tertiary; + jshort equality; + jboolean ignore; + ::java::lang::String * expansion; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_RuleBasedCollator$CollationElement__ diff --git a/libjava/java/text/RuleBasedCollator$CollationSorter.h b/libjava/java/text/RuleBasedCollator$CollationSorter.h new file mode 100644 index 000000000..fb3d18895 --- /dev/null +++ b/libjava/java/text/RuleBasedCollator$CollationSorter.h @@ -0,0 +1,43 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_RuleBasedCollator$CollationSorter__ +#define __java_text_RuleBasedCollator$CollationSorter__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class RuleBasedCollator$CollationSorter; + } + } +} + +class java::text::RuleBasedCollator$CollationSorter : public ::java::lang::Object +{ + + RuleBasedCollator$CollationSorter(jint, ::java::lang::String *, jint, jboolean); +public: // actually package-private + RuleBasedCollator$CollationSorter(jint, ::java::lang::String *, jint, jboolean, ::java::text::RuleBasedCollator$CollationSorter *); + static const jint GREATERP = 0; + static const jint GREATERS = 1; + static const jint GREATERT = 2; + static const jint EQUAL = 3; + static const jint RESET = 4; + static const jint INVERSE_SECONDARY = 5; + jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) comparisonType; + ::java::lang::String * textElement; + jint hashText; + jint offset; + jboolean ignore; + ::java::lang::String * expansionOrdering; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_RuleBasedCollator$CollationSorter__ diff --git a/libjava/java/text/RuleBasedCollator.h b/libjava/java/text/RuleBasedCollator.h new file mode 100644 index 000000000..74b5aa8ea --- /dev/null +++ b/libjava/java/text/RuleBasedCollator.h @@ -0,0 +1,70 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_RuleBasedCollator__ +#define __java_text_RuleBasedCollator__ + +#pragma interface + +#include <java/text/Collator.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace java + { + namespace text + { + class CharacterIterator; + class CollationElementIterator; + class CollationKey; + class RuleBasedCollator; + class RuleBasedCollator$CollationElement; + } + } +} + +class java::text::RuleBasedCollator : public ::java::text::Collator +{ + +public: + RuleBasedCollator(::java::lang::String *); +public: // actually package-private + static jint findPrefixLength(::java::lang::String *, ::java::lang::String *); +private: + void mergeRules(jint, ::java::lang::String *, ::java::util::ArrayList *, ::java::util::ArrayList *); + jint subParseString(jboolean, ::java::util::ArrayList *, jint, ::java::lang::String *); +public: + virtual ::java::lang::Object * clone(); +private: + ::java::util::ArrayList * parseString(::java::lang::String *); + void buildCollationVector(::java::util::ArrayList *); + void buildPrefixAccess(); +public: + virtual jint compare(::java::lang::String *, ::java::lang::String *); + virtual jboolean equals(::java::lang::Object *); +public: // actually package-private + virtual ::java::text::RuleBasedCollator$CollationElement * getDefaultElement(jchar); + virtual ::java::text::RuleBasedCollator$CollationElement * getDefaultAccentedElement(jchar); +public: + virtual ::java::text::CollationElementIterator * getCollationElementIterator(::java::lang::String *); + virtual ::java::text::CollationElementIterator * getCollationElementIterator(::java::text::CharacterIterator *); + virtual ::java::text::CollationKey * getCollationKey(::java::lang::String *); + virtual ::java::lang::String * getRules(); + virtual jint hashCode(); +private: + ::java::lang::String * __attribute__((aligned(__alignof__( ::java::text::Collator)))) rules; + JArray< ::java::text::RuleBasedCollator$CollationElement * > * ce_table; +public: // actually package-private + ::java::util::HashMap * prefix_tree; +private: + jint last_primary_value; + jint last_tertiary_value; + jboolean inverseAccentComparison; +public: // actually package-private + static ::java::text::RuleBasedCollator$CollationElement * SPECIAL_UNKNOWN_SEQ; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_RuleBasedCollator__ diff --git a/libjava/java/text/SimpleDateFormat$CompiledField.h b/libjava/java/text/SimpleDateFormat$CompiledField.h new file mode 100644 index 000000000..b18879201 --- /dev/null +++ b/libjava/java/text/SimpleDateFormat$CompiledField.h @@ -0,0 +1,42 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_SimpleDateFormat$CompiledField__ +#define __java_text_SimpleDateFormat$CompiledField__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class SimpleDateFormat; + class SimpleDateFormat$CompiledField; + } + } +} + +class java::text::SimpleDateFormat$CompiledField : public ::java::lang::Object +{ + +public: + SimpleDateFormat$CompiledField(::java::text::SimpleDateFormat *, jint, jint, jchar); + virtual jint getField(); + virtual jint getSize(); + virtual jchar getCharacter(); + virtual ::java::lang::String * toString(); +public: // actually package-private + jint __attribute__((aligned(__alignof__( ::java::lang::Object)))) field; + jint size; +private: + jchar character; +public: // actually package-private + ::java::text::SimpleDateFormat * this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_SimpleDateFormat$CompiledField__ diff --git a/libjava/java/text/SimpleDateFormat.h b/libjava/java/text/SimpleDateFormat.h new file mode 100644 index 000000000..dbdb8169f --- /dev/null +++ b/libjava/java/text/SimpleDateFormat.h @@ -0,0 +1,88 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_SimpleDateFormat__ +#define __java_text_SimpleDateFormat__ + +#pragma interface + +#include <java/text/DateFormat.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace text + { + class FormatBuffer; + } + } + } + namespace java + { + namespace text + { + class AttributedCharacterIterator; + class DateFormatSymbols; + class FieldPosition; + class ParsePosition; + class SimpleDateFormat; + } + } +} + +class java::text::SimpleDateFormat : public ::java::text::DateFormat +{ + + void readObject(::java::io::ObjectInputStream *); + void compileFormat(::java::lang::String *); +public: + virtual ::java::lang::String * toString(); + SimpleDateFormat(); + SimpleDateFormat(::java::lang::String *); + SimpleDateFormat(::java::lang::String *, ::java::util::Locale *); + SimpleDateFormat(::java::lang::String *, ::java::text::DateFormatSymbols *); + virtual ::java::lang::String * toPattern(); + virtual ::java::lang::String * toLocalizedPattern(); + virtual void applyPattern(::java::lang::String *); + virtual void applyLocalizedPattern(::java::lang::String *); +private: + ::java::lang::String * translateLocalizedPattern(::java::lang::String *, ::java::lang::String *, ::java::lang::String *); +public: + virtual ::java::util::Date * get2DigitYearStart(); + virtual void set2DigitYearStart(::java::util::Date *); + virtual ::java::text::DateFormatSymbols * getDateFormatSymbols(); + virtual void setDateFormatSymbols(::java::text::DateFormatSymbols *); + virtual jboolean equals(::java::lang::Object *); + virtual jint hashCode(); +private: + void formatWithAttribute(::java::util::Date *, ::gnu::java::text::FormatBuffer *, ::java::text::FieldPosition *); +public: + virtual ::java::lang::StringBuffer * format(::java::util::Date *, ::java::lang::StringBuffer *, ::java::text::FieldPosition *); + virtual ::java::text::AttributedCharacterIterator * formatToCharacterIterator(::java::lang::Object *); +private: + void withLeadingZeros(jint, jint, ::gnu::java::text::FormatBuffer *); + jboolean expect(::java::lang::String *, ::java::text::ParsePosition *, jchar); +public: + virtual ::java::util::Date * parse(::java::lang::String *, ::java::text::ParsePosition *); +private: + ::java::lang::Integer * computeOffset(::java::lang::String *, ::java::text::ParsePosition *); + void computeCenturyStart(); +public: + virtual ::java::lang::Object * clone(); +private: + ::java::util::ArrayList * __attribute__((aligned(__alignof__( ::java::text::DateFormat)))) tokens; + ::java::text::DateFormatSymbols * formatData; + ::java::util::Date * defaultCenturyStart; + jint defaultCentury; + ::java::lang::String * pattern; + jint serialVersionOnStream; + static const jlong serialVersionUID = 4774881970558875024LL; + static ::java::lang::String * standardChars; + static const jint RFC822_TIMEZONE_FIELD = 23; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_SimpleDateFormat__ diff --git a/libjava/java/text/StringCharacterIterator.h b/libjava/java/text/StringCharacterIterator.h new file mode 100644 index 000000000..d17696356 --- /dev/null +++ b/libjava/java/text/StringCharacterIterator.h @@ -0,0 +1,53 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_StringCharacterIterator__ +#define __java_text_StringCharacterIterator__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace java + { + namespace text + { + class StringCharacterIterator; + } + } +} + +class java::text::StringCharacterIterator : public ::java::lang::Object +{ + +public: + StringCharacterIterator(::java::lang::String *); + StringCharacterIterator(::java::lang::String *, jint); + StringCharacterIterator(::java::lang::String *, jint, jint, jint); +public: // actually package-private + StringCharacterIterator(::java::text::StringCharacterIterator *, jint, jint); +public: + jchar current(); + jchar next(); + jchar previous(); + jchar first(); + jchar last(); + jint getIndex(); + jchar setIndex(jint); + jint getBeginIndex(); + jint getEndIndex(); + ::java::lang::Object * clone(); + jboolean equals(::java::lang::Object *); + jint hashCode(); + void setText(::java::lang::String *); +private: + ::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) text; + jint begin; + jint end; + jint index; +public: + static ::java::lang::Class class$; +}; + +#endif // __java_text_StringCharacterIterator__ diff --git a/libjava/java/text/natCollator.cc b/libjava/java/text/natCollator.cc new file mode 100644 index 000000000..676a4a41a --- /dev/null +++ b/libjava/java/text/natCollator.cc @@ -0,0 +1,74 @@ +// natCollator.cc - Native code for collation. + +/* Copyright (C) 1999 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +// Written by Tom Tromey <tromey@cygnus.com>. + +#include <config.h> + +#include <gcj/cni.h> +#include <jvm.h> + +#include <java/text/Collator.h> +#include <java/lang/StringBuffer.h> + +#include <java-chardecomp.h> + +void +java::text::Collator::decomposeCharacter (jchar c, + java::lang::StringBuffer *buf) +{ + if (decmp == NO_DECOMPOSITION) + { + buf->append(c); + return; + } + + const struct decomp_entry *base; + int high; + + if (decmp == FULL_DECOMPOSITION) + { + base = full_decomposition; + high = sizeof (full_decomposition) / sizeof (struct decomp_entry); + } + else + { + base = canonical_decomposition; + high = sizeof (canonical_decomposition) / sizeof (struct decomp_entry); + } + + // FIXME: this is probably a bit slow for the task at hand. + int i = high / 2; + int low = 0; + while (true) + { + if (c < base[i].key) + high = i; + else if (c > base[i].key) + low = i; + else + break; + + int old = i; + i = (high + low) / 2; + if (i == old) + { + // Not in table, so it expands to itself. + buf->append(c); + return; + } + } + + for (int j = 0; base[i].value[j] != '\0'; j += 2) + { + jchar x = (base[i].value[j] << 8) | (base[i].value[j + 1]); + buf->append (x); + } +} diff --git a/libjava/java/text/spi/BreakIteratorProvider.h b/libjava/java/text/spi/BreakIteratorProvider.h new file mode 100644 index 000000000..663dff22f --- /dev/null +++ b/libjava/java/text/spi/BreakIteratorProvider.h @@ -0,0 +1,38 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_spi_BreakIteratorProvider__ +#define __java_text_spi_BreakIteratorProvider__ + +#pragma interface + +#include <java/util/spi/LocaleServiceProvider.h> +extern "Java" +{ + namespace java + { + namespace text + { + class BreakIterator; + namespace spi + { + class BreakIteratorProvider; + } + } + } +} + +class java::text::spi::BreakIteratorProvider : public ::java::util::spi::LocaleServiceProvider +{ + +public: // actually protected + BreakIteratorProvider(); +public: + virtual ::java::text::BreakIterator * getCharacterInstance(::java::util::Locale *) = 0; + virtual ::java::text::BreakIterator * getLineInstance(::java::util::Locale *) = 0; + virtual ::java::text::BreakIterator * getSentenceInstance(::java::util::Locale *) = 0; + virtual ::java::text::BreakIterator * getWordInstance(::java::util::Locale *) = 0; + static ::java::lang::Class class$; +}; + +#endif // __java_text_spi_BreakIteratorProvider__ diff --git a/libjava/java/text/spi/CollatorProvider.h b/libjava/java/text/spi/CollatorProvider.h new file mode 100644 index 000000000..bf072711b --- /dev/null +++ b/libjava/java/text/spi/CollatorProvider.h @@ -0,0 +1,35 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_spi_CollatorProvider__ +#define __java_text_spi_CollatorProvider__ + +#pragma interface + +#include <java/util/spi/LocaleServiceProvider.h> +extern "Java" +{ + namespace java + { + namespace text + { + class Collator; + namespace spi + { + class CollatorProvider; + } + } + } +} + +class java::text::spi::CollatorProvider : public ::java::util::spi::LocaleServiceProvider +{ + +public: // actually protected + CollatorProvider(); +public: + virtual ::java::text::Collator * getInstance(::java::util::Locale *) = 0; + static ::java::lang::Class class$; +}; + +#endif // __java_text_spi_CollatorProvider__ diff --git a/libjava/java/text/spi/DateFormatProvider.h b/libjava/java/text/spi/DateFormatProvider.h new file mode 100644 index 000000000..15f6e36e2 --- /dev/null +++ b/libjava/java/text/spi/DateFormatProvider.h @@ -0,0 +1,37 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_spi_DateFormatProvider__ +#define __java_text_spi_DateFormatProvider__ + +#pragma interface + +#include <java/util/spi/LocaleServiceProvider.h> +extern "Java" +{ + namespace java + { + namespace text + { + class DateFormat; + namespace spi + { + class DateFormatProvider; + } + } + } +} + +class java::text::spi::DateFormatProvider : public ::java::util::spi::LocaleServiceProvider +{ + +public: // actually protected + DateFormatProvider(); +public: + virtual ::java::text::DateFormat * getDateInstance(jint, ::java::util::Locale *) = 0; + virtual ::java::text::DateFormat * getDateTimeInstance(jint, jint, ::java::util::Locale *) = 0; + virtual ::java::text::DateFormat * getTimeInstance(jint, ::java::util::Locale *) = 0; + static ::java::lang::Class class$; +}; + +#endif // __java_text_spi_DateFormatProvider__ diff --git a/libjava/java/text/spi/DateFormatSymbolsProvider.h b/libjava/java/text/spi/DateFormatSymbolsProvider.h new file mode 100644 index 000000000..4a7012920 --- /dev/null +++ b/libjava/java/text/spi/DateFormatSymbolsProvider.h @@ -0,0 +1,35 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_spi_DateFormatSymbolsProvider__ +#define __java_text_spi_DateFormatSymbolsProvider__ + +#pragma interface + +#include <java/util/spi/LocaleServiceProvider.h> +extern "Java" +{ + namespace java + { + namespace text + { + class DateFormatSymbols; + namespace spi + { + class DateFormatSymbolsProvider; + } + } + } +} + +class java::text::spi::DateFormatSymbolsProvider : public ::java::util::spi::LocaleServiceProvider +{ + +public: // actually protected + DateFormatSymbolsProvider(); +public: + virtual ::java::text::DateFormatSymbols * getInstance(::java::util::Locale *) = 0; + static ::java::lang::Class class$; +}; + +#endif // __java_text_spi_DateFormatSymbolsProvider__ diff --git a/libjava/java/text/spi/DecimalFormatSymbolsProvider.h b/libjava/java/text/spi/DecimalFormatSymbolsProvider.h new file mode 100644 index 000000000..ceead0294 --- /dev/null +++ b/libjava/java/text/spi/DecimalFormatSymbolsProvider.h @@ -0,0 +1,35 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_spi_DecimalFormatSymbolsProvider__ +#define __java_text_spi_DecimalFormatSymbolsProvider__ + +#pragma interface + +#include <java/util/spi/LocaleServiceProvider.h> +extern "Java" +{ + namespace java + { + namespace text + { + class DecimalFormatSymbols; + namespace spi + { + class DecimalFormatSymbolsProvider; + } + } + } +} + +class java::text::spi::DecimalFormatSymbolsProvider : public ::java::util::spi::LocaleServiceProvider +{ + +public: // actually protected + DecimalFormatSymbolsProvider(); +public: + virtual ::java::text::DecimalFormatSymbols * getInstance(::java::util::Locale *) = 0; + static ::java::lang::Class class$; +}; + +#endif // __java_text_spi_DecimalFormatSymbolsProvider__ diff --git a/libjava/java/text/spi/NumberFormatProvider.h b/libjava/java/text/spi/NumberFormatProvider.h new file mode 100644 index 000000000..4224aeaa4 --- /dev/null +++ b/libjava/java/text/spi/NumberFormatProvider.h @@ -0,0 +1,38 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __java_text_spi_NumberFormatProvider__ +#define __java_text_spi_NumberFormatProvider__ + +#pragma interface + +#include <java/util/spi/LocaleServiceProvider.h> +extern "Java" +{ + namespace java + { + namespace text + { + class NumberFormat; + namespace spi + { + class NumberFormatProvider; + } + } + } +} + +class java::text::spi::NumberFormatProvider : public ::java::util::spi::LocaleServiceProvider +{ + +public: // actually protected + NumberFormatProvider(); +public: + virtual ::java::text::NumberFormat * getCurrencyInstance(::java::util::Locale *) = 0; + virtual ::java::text::NumberFormat * getIntegerInstance(::java::util::Locale *) = 0; + virtual ::java::text::NumberFormat * getNumberInstance(::java::util::Locale *) = 0; + virtual ::java::text::NumberFormat * getPercentInstance(::java::util::Locale *) = 0; + static ::java::lang::Class class$; +}; + +#endif // __java_text_spi_NumberFormatProvider__ |