213 }
214 bool ends_with(const char* suffix) const {
215 return ends_with(suffix, (int) strlen(suffix));
216 }
217 bool ends_with(char suffix_char) const {
218 return contains_byte_at(utf8_length()-1, suffix_char);
219 }
220 // Tests if the symbol contains the given utf8 substring
221 // or byte at the given byte position.
222 bool contains_utf8_at(int position, const char* substring, int len) const;
223 bool contains_byte_at(int position, char code_byte) const;
224
225 // True if this is a descriptor for a method with void return.
226 // (Assumes it is a valid descriptor.)
227 bool is_void_method_signature() const {
228 return starts_with('(') && ends_with('V');
229 }
230
231 bool is_Q_signature() const;
232 bool is_Q_array_signature() const;
233 Symbol* fundamental_name(TRAPS);
234 bool is_same_fundamental_type(Symbol*) const;
235
236 // Tests if the symbol starts with the given prefix.
237 int index_of_at(int i, const char* str, int len) const;
238
239 // Three-way compare for sorting; returns -1/0/1 if receiver is </==/> than arg
240 // note that the ordering is not alfabetical
241 inline int fast_compare(const Symbol* other) const;
242
243 // Returns receiver converted to null-terminated UTF-8 string; string is
244 // allocated in resource area, or in the char buffer provided by caller.
245 char* as_C_string() const;
246 char* as_C_string(char* buf, int size) const;
247
248 // Returns an escaped form of a Java string.
249 char* as_quoted_ascii() const;
250
251 // Returns a null terminated utf8 string in a resource array
252 char* as_utf8() const { return as_C_string(); }
|
213 }
214 bool ends_with(const char* suffix) const {
215 return ends_with(suffix, (int) strlen(suffix));
216 }
217 bool ends_with(char suffix_char) const {
218 return contains_byte_at(utf8_length()-1, suffix_char);
219 }
220 // Tests if the symbol contains the given utf8 substring
221 // or byte at the given byte position.
222 bool contains_utf8_at(int position, const char* substring, int len) const;
223 bool contains_byte_at(int position, char code_byte) const;
224
225 // True if this is a descriptor for a method with void return.
226 // (Assumes it is a valid descriptor.)
227 bool is_void_method_signature() const {
228 return starts_with('(') && ends_with('V');
229 }
230
231 bool is_Q_signature() const;
232 bool is_Q_array_signature() const;
233 bool is_Q_singledim_array_signature() const;
234 Symbol* fundamental_name(TRAPS);
235 bool is_same_fundamental_type(Symbol*) const;
236
237 // Tests if the symbol starts with the given prefix.
238 int index_of_at(int i, const char* str, int len) const;
239
240 // Three-way compare for sorting; returns -1/0/1 if receiver is </==/> than arg
241 // note that the ordering is not alfabetical
242 inline int fast_compare(const Symbol* other) const;
243
244 // Returns receiver converted to null-terminated UTF-8 string; string is
245 // allocated in resource area, or in the char buffer provided by caller.
246 char* as_C_string() const;
247 char* as_C_string(char* buf, int size) const;
248
249 // Returns an escaped form of a Java string.
250 char* as_quoted_ascii() const;
251
252 // Returns a null terminated utf8 string in a resource array
253 char* as_utf8() const { return as_C_string(); }
|