< prev index next >

src/hotspot/share/oops/symbol.hpp

Print this page




 212 
 213   // Returns receiver converted to null-terminated UTF-8 string; string is
 214   // allocated in resource area, or in the char buffer provided by caller.
 215   char* as_C_string() const;
 216   char* as_C_string(char* buf, int size) const;
 217 
 218   // Returns an escaped form of a Java string.
 219   char* as_quoted_ascii() const;
 220 
 221   // Returns a null terminated utf8 string in a resource array
 222   char* as_utf8() const { return as_C_string(); }
 223 
 224   jchar* as_unicode(int& length) const;
 225 
 226   // Treating this symbol as a class name, returns the Java name for the class.
 227   // String is allocated in resource area if buffer is not provided.
 228   // See Klass::external_name()
 229   const char* as_klass_external_name() const;
 230   const char* as_klass_external_name(char* buf, int size) const;
 231 
 232   // Treating the symbol as a signature, print the return
 233   // type to the outputStream. Prints external names as 'double' or
 234   // 'java.lang.Object[][]'.
 235   void print_as_signature_external_return_type(outputStream *os);
 236   // Treating the symbol as a signature, print the parameter types
 237   // seperated by ', ' to the outputStream.  Prints external names as
 238   //  'double' or 'java.lang.Object[][]'.
 239   void print_as_signature_external_parameters(outputStream *os);
 240 
 241   void metaspace_pointers_do(MetaspaceClosure* it);
 242   MetaspaceObj::Type type() const { return SymbolType; }
 243 
 244   // Printing
 245   void print_symbol_on(outputStream* st = NULL) const;
 246   void print_utf8_on(outputStream* st) const;
 247   void print_on(outputStream* st) const;         // First level print
 248   void print_value_on(outputStream* st) const;   // Second level print.
 249 
 250   // printing on default output stream
 251   void print()         { print_on(tty);       }
 252   void print_value()   { print_value_on(tty); }
 253 
 254   static bool is_valid(Symbol* s);
 255 
 256 #ifndef PRODUCT
 257   // Empty constructor to create a dummy symbol object on stack
 258   // only for getting its vtable pointer.
 259   Symbol() { }
 260 


 212 
 213   // Returns receiver converted to null-terminated UTF-8 string; string is
 214   // allocated in resource area, or in the char buffer provided by caller.
 215   char* as_C_string() const;
 216   char* as_C_string(char* buf, int size) const;
 217 
 218   // Returns an escaped form of a Java string.
 219   char* as_quoted_ascii() const;
 220 
 221   // Returns a null terminated utf8 string in a resource array
 222   char* as_utf8() const { return as_C_string(); }
 223 
 224   jchar* as_unicode(int& length) const;
 225 
 226   // Treating this symbol as a class name, returns the Java name for the class.
 227   // String is allocated in resource area if buffer is not provided.
 228   // See Klass::external_name()
 229   const char* as_klass_external_name() const;
 230   const char* as_klass_external_name(char* buf, int size) const;
 231 









 232   void metaspace_pointers_do(MetaspaceClosure* it);
 233   MetaspaceObj::Type type() const { return SymbolType; }
 234 
 235   // Printing
 236   void print_symbol_on(outputStream* st = NULL) const;
 237   void print_utf8_on(outputStream* st) const;
 238   void print_on(outputStream* st) const;         // First level print
 239   void print_value_on(outputStream* st) const;   // Second level print.
 240 
 241   // printing on default output stream
 242   void print()         { print_on(tty);       }
 243   void print_value()   { print_value_on(tty); }
 244 
 245   static bool is_valid(Symbol* s);
 246 
 247 #ifndef PRODUCT
 248   // Empty constructor to create a dummy symbol object on stack
 249   // only for getting its vtable pointer.
 250   Symbol() { }
 251 
< prev index next >