// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __java_lang_String__
#define __java_lang_String__

#pragma interface

#include <java/lang/Object.h>
#include <gcj/array.h>

extern "Java"
{
  namespace gnu
  {
    namespace gcj
    {
      namespace runtime
      {
        class StringBuffer;
      }
    }
  }
}

jchar* _Jv_GetStringChars (jstring str);
jstring* _Jv_StringFindSlot (jchar*, jint, jint);
jstring* _Jv_StringGetSlot (jstring);
jstring _Jv_NewStringUtf8Const (_Jv_Utf8Const* str);
jstring _Jv_NewStringLatin1 (const char*, jsize);
jstring _Jv_AllocString (jsize);

class java::lang::String : public ::java::lang::Object
{
public:
  String ();
  String (::java::lang::String *);
  String (jcharArray);
  String (jcharArray, jint, jint);
  String (jbyteArray, jint, jint, jint);
  String (jbyteArray, jint);
  String (jbyteArray, jint, jint, ::java::lang::String *);
  String (jbyteArray, ::java::lang::String *);
  String (jbyteArray, jint, jint);
  String (jbyteArray);
  String (::java::lang::StringBuffer *);
  String (::java::lang::StringBuilder *);
public: // actually package-private
  String (jcharArray, jint, jint, jboolean);
  String (::gnu::gcj::runtime::StringBuffer *);
public:
  virtual jint length () { return count; }
  virtual jchar charAt (jint);
  virtual jint codePointAt (jint);
  virtual jint codePointBefore (jint);
  virtual void getChars (jint, jint, jcharArray, jint);
  virtual void getBytes (jint, jint, jbyteArray, jint);
  virtual jbyteArray getBytes (::java::lang::String *);
  virtual jbyteArray getBytes ();
  virtual jboolean equals (::java::lang::Object *);
  virtual jboolean contentEquals (::java::lang::StringBuffer *);
  virtual jboolean contentEquals (::java::lang::CharSequence *);
  virtual jboolean equalsIgnoreCase (::java::lang::String *);
  virtual jint compareTo (::java::lang::String *);
  virtual jint compareTo (::java::lang::Object *);
  virtual jint compareToIgnoreCase (::java::lang::String *);
  virtual jboolean regionMatches (jint, ::java::lang::String *, jint, jint);
  virtual jboolean regionMatches (jboolean, jint, ::java::lang::String *, jint, jint);
  virtual jboolean startsWith (::java::lang::String *, jint);
  virtual jboolean startsWith (::java::lang::String *);
  virtual jboolean endsWith (::java::lang::String *);
  virtual jint hashCode ();
  virtual jint indexOf (jint);
  virtual jint indexOf (jint, jint);
  virtual jint lastIndexOf (jint);
  virtual jint lastIndexOf (jint, jint);
  virtual jint indexOf (::java::lang::String *);
  virtual jint indexOf (::java::lang::String *, jint);
  virtual jint lastIndexOf (::java::lang::String *);
  virtual jint lastIndexOf (::java::lang::String *, jint);
  virtual ::java::lang::String *substring (jint);
  virtual ::java::lang::String *substring (jint, jint);
  virtual ::java::lang::CharSequence *subSequence (jint, jint);
  virtual ::java::lang::String *concat (::java::lang::String *);
  virtual ::java::lang::String *replace (jchar, jchar);
  virtual jboolean matches (::java::lang::String *);
  virtual ::java::lang::String *replaceFirst (::java::lang::String *, ::java::lang::String *);
  virtual ::java::lang::String *replaceAll (::java::lang::String *, ::java::lang::String *);
  virtual JArray< ::java::lang::String *> *split (::java::lang::String *, jint);
  virtual JArray< ::java::lang::String *> *split (::java::lang::String *);
  virtual ::java::lang::String *toLowerCase (::java::util::Locale *);
  virtual ::java::lang::String *toLowerCase ();
  virtual ::java::lang::String *toUpperCase (::java::util::Locale *);
  virtual ::java::lang::String *toUpperCase ();
  virtual ::java::lang::String *trim ();
  virtual ::java::lang::String *toString () { return this; }
  virtual jcharArray toCharArray ();
  static ::java::lang::String *valueOf (::java::lang::Object *);
  static ::java::lang::String *valueOf (jcharArray);
  static ::java::lang::String *valueOf (jcharArray, jint, jint);
  static ::java::lang::String *copyValueOf (jcharArray, jint, jint);
  static ::java::lang::String *copyValueOf (jcharArray);
  static ::java::lang::String *valueOf (jboolean);
  static ::java::lang::String *valueOf (jchar);
  static ::java::lang::String *valueOf (jint);
  static ::java::lang::String *valueOf (jlong);
  static ::java::lang::String *valueOf (jfloat);
  static ::java::lang::String *valueOf (jdouble);
  virtual ::java::lang::String *intern ();
  virtual jint codePointCount (jint, jint);
  virtual jboolean contains (::java::lang::CharSequence *);
  virtual ::java::lang::String *replace (::java::lang::CharSequence *, ::java::lang::CharSequence *);
private:
  void init (jcharArray, jint, jint, jboolean);
  void init (jbyteArray, jint, jint, jint);
  void init (jbyteArray, jint, jint, ::java::lang::String *);
  void init (::gnu::gcj::runtime::StringBuffer *);
  static const jlong serialVersionUID = -6849794470754667710LL;
  ::java::lang::Object * __attribute__((aligned(__alignof__( ::java::lang::Object )))) data;
  jint boffset;
public: // actually package-private
  jint count;
private:
  jint cachedHashCode;
public:
  static ::java::util::Comparator *CASE_INSENSITIVE_ORDER;

  friend class java_lang_String$CaseInsensitiveComparator;
  friend jchar* ::_Jv_GetStringChars (jstring str);
  friend jstring* ::_Jv_StringFindSlot (jchar*, jint, jint);
  friend jstring* ::_Jv_StringGetSlot (jstring);
  friend jstring (::_Jv_NewStringUtf8Const) (_Jv_Utf8Const* str);
  friend jstring (::_Jv_NewStringLatin1) (const char*, jsize);
  friend jstring (::_Jv_AllocString) (jsize);

  static ::java::lang::Class class$;
};

#endif /* __java_lang_String__ */
