String.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. // DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
  2. #ifndef __java_lang_String__
  3. #define __java_lang_String__
  4. #pragma interface
  5. #include <java/lang/Object.h>
  6. #include <gcj/array.h>
  7. extern "Java"
  8. {
  9. namespace gnu
  10. {
  11. namespace gcj
  12. {
  13. namespace runtime
  14. {
  15. class StringBuffer;
  16. }
  17. }
  18. }
  19. }
  20. jchar* _Jv_GetStringChars (jstring str);
  21. jstring* _Jv_StringFindSlot (jchar*, jint, jint);
  22. jstring* _Jv_StringGetSlot (jstring);
  23. jstring _Jv_NewStringUtf8Const (_Jv_Utf8Const* str);
  24. jstring _Jv_NewStringLatin1 (const char*, jsize);
  25. jstring _Jv_AllocString (jsize);
  26. class java::lang::String : public ::java::lang::Object
  27. {
  28. public:
  29. String();
  30. String(::java::lang::String *);
  31. String(JArray< jchar > *);
  32. String(JArray< jchar > *, jint, jint);
  33. String(JArray< jbyte > *, jint, jint, jint);
  34. String(JArray< jbyte > *, jint);
  35. String(JArray< jbyte > *, jint, jint, ::java::lang::String *);
  36. String(JArray< jbyte > *, ::java::lang::String *);
  37. String(JArray< jbyte > *, jint, jint);
  38. String(JArray< jbyte > *);
  39. String(::java::lang::StringBuffer *);
  40. String(::java::lang::StringBuilder *);
  41. public: // actually package-private
  42. String(JArray< jchar > *, jint, jint, jboolean);
  43. String(::gnu::gcj::runtime::StringBuffer *);
  44. public:
  45. jint length();
  46. jchar charAt(jint);
  47. jint codePointAt(jint);
  48. jint codePointBefore(jint);
  49. void getChars(jint, jint, JArray< jchar > *, jint);
  50. void getBytes(jint, jint, JArray< jbyte > *, jint);
  51. JArray< jbyte > * getBytes(::java::lang::String *);
  52. JArray< jbyte > * getBytes();
  53. jboolean equals(::java::lang::Object *);
  54. jboolean contentEquals(::java::lang::StringBuffer *);
  55. jboolean contentEquals(::java::lang::CharSequence *);
  56. jboolean equalsIgnoreCase(::java::lang::String *);
  57. jint String$compareTo(::java::lang::String *);
  58. private:
  59. jint nativeCompareTo(::java::lang::String *);
  60. public:
  61. jint compareToIgnoreCase(::java::lang::String *);
  62. jboolean regionMatches(jint, ::java::lang::String *, jint, jint);
  63. jboolean regionMatches(jboolean, jint, ::java::lang::String *, jint, jint);
  64. jboolean startsWith(::java::lang::String *, jint);
  65. jboolean startsWith(::java::lang::String *);
  66. jboolean endsWith(::java::lang::String *);
  67. jint hashCode();
  68. jint indexOf(jint);
  69. jint indexOf(jint, jint);
  70. jint lastIndexOf(jint);
  71. jint lastIndexOf(jint, jint);
  72. jint indexOf(::java::lang::String *);
  73. jint indexOf(::java::lang::String *, jint);
  74. jint lastIndexOf(::java::lang::String *);
  75. jint lastIndexOf(::java::lang::String *, jint);
  76. ::java::lang::String * substring(jint);
  77. ::java::lang::String * substring(jint, jint);
  78. ::java::lang::CharSequence * subSequence(jint, jint);
  79. ::java::lang::String * concat(::java::lang::String *);
  80. ::java::lang::String * replace(jchar, jchar);
  81. jboolean matches(::java::lang::String *);
  82. ::java::lang::String * replaceFirst(::java::lang::String *, ::java::lang::String *);
  83. ::java::lang::String * replaceAll(::java::lang::String *, ::java::lang::String *);
  84. JArray< ::java::lang::String * > * split(::java::lang::String *, jint);
  85. JArray< ::java::lang::String * > * split(::java::lang::String *);
  86. ::java::lang::String * toLowerCase(::java::util::Locale *);
  87. ::java::lang::String * toLowerCase();
  88. ::java::lang::String * toUpperCase(::java::util::Locale *);
  89. ::java::lang::String * toUpperCase();
  90. ::java::lang::String * trim();
  91. ::java::lang::String * toString();
  92. JArray< jchar > * toCharArray();
  93. static ::java::lang::String * valueOf(::java::lang::Object *);
  94. static ::java::lang::String * valueOf(JArray< jchar > *);
  95. static ::java::lang::String * valueOf(JArray< jchar > *, jint, jint);
  96. static ::java::lang::String * copyValueOf(JArray< jchar > *, jint, jint);
  97. static ::java::lang::String * copyValueOf(JArray< jchar > *);
  98. static ::java::lang::String * valueOf(jboolean);
  99. static ::java::lang::String * valueOf(jchar);
  100. static ::java::lang::String * valueOf(jint);
  101. static ::java::lang::String * valueOf(jlong);
  102. static ::java::lang::String * valueOf(jfloat);
  103. static ::java::lang::String * valueOf(jdouble);
  104. static ::java::lang::String * format(::java::util::Locale *, ::java::lang::String *, JArray< ::java::lang::Object * > *);
  105. static ::java::lang::String * format(::java::lang::String *, JArray< ::java::lang::Object * > *);
  106. ::java::lang::String * intern();
  107. jint codePointCount(jint, jint);
  108. jboolean contains(::java::lang::CharSequence *);
  109. ::java::lang::String * replace(::java::lang::CharSequence *, ::java::lang::CharSequence *);
  110. jint offsetByCodePoints(jint, jint);
  111. jboolean isEmpty();
  112. private:
  113. static ::java::lang::String * toString(JArray< jchar > *, jint, jint);
  114. void init(JArray< jchar > *, jint, jint, jboolean);
  115. void init(JArray< jbyte > *, jint, jint, jint);
  116. void init(JArray< jbyte > *, jint, jint, ::java::lang::String *);
  117. void init(::gnu::gcj::runtime::StringBuffer *);
  118. public:
  119. jint compareTo(::java::lang::Object *);
  120. private:
  121. static const jlong serialVersionUID = -6849794470754667710LL;
  122. ::java::lang::Object * __attribute__((aligned(__alignof__( ::java::lang::Object)))) data;
  123. jint boffset;
  124. public: // actually package-private
  125. jint count;
  126. private:
  127. jint cachedHashCode;
  128. public:
  129. static ::java::util::Comparator * CASE_INSENSITIVE_ORDER;
  130. static ::java::lang::Class class$;
  131. friend jchar* ::_Jv_GetStringChars (jstring str);
  132. friend jstring* ::_Jv_StringFindSlot (jchar*, jint, jint);
  133. friend jstring* ::_Jv_StringGetSlot (jstring);
  134. friend jstring (::_Jv_NewStringUtf8Const) (_Jv_Utf8Const* str);
  135. friend jstring (::_Jv_NewStringLatin1) (const char*, jsize);
  136. friend jstring (::_Jv_AllocString) (jsize);
  137. };
  138. #endif // __java_lang_String__