< prev index next >

src/hotspot/share/utilities/xmlstream.cpp

Print this page


   1 /*
   2  * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 450 void xmlStream::name_text(const Symbol* name) {
 451   assert_if_no_error(inside_attrs(), "printing attributes");
 452   if (name == NULL)  return;
 453   //name->print_short_name(text());
 454   name->print_symbol_on(text());
 455 }
 456 
 457 void xmlStream::object(const char* attr, Handle x) {
 458   assert_if_no_error(inside_attrs(), "printing attributes");
 459   if (x == NULL)  return;
 460   print_raw(" ");
 461   print_raw(attr);
 462   print_raw("='");
 463   object_text(x);
 464   print_raw("'");
 465 }
 466 
 467 void xmlStream::object_text(Handle x) {
 468   assert_if_no_error(inside_attrs(), "printing attributes");
 469   if (x == NULL)  return;
 470   x->print_value_on(text());
 471 }
 472 
 473 
 474 void xmlStream::object(const char* attr, Metadata* x) {
 475   assert_if_no_error(inside_attrs(), "printing attributes");
 476   if (x == NULL)  return;
 477   print_raw(" ");
 478   print_raw(attr);
 479   print_raw("='");
 480   object_text(x);
 481   print_raw("'");
 482 }
 483 
 484 void xmlStream::object_text(Metadata* x) {
 485   assert_if_no_error(inside_attrs(), "printing attributes");
 486   if (x == NULL)  return;
 487   //x->print_value_on(text());
 488   if (x->is_method())
 489     method_text((Method*)x);
 490   else if (x->is_klass())


   1 /*
   2  * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 450 void xmlStream::name_text(const Symbol* name) {
 451   assert_if_no_error(inside_attrs(), "printing attributes");
 452   if (name == NULL)  return;
 453   //name->print_short_name(text());
 454   name->print_symbol_on(text());
 455 }
 456 
 457 void xmlStream::object(const char* attr, Handle x) {
 458   assert_if_no_error(inside_attrs(), "printing attributes");
 459   if (x == NULL)  return;
 460   print_raw(" ");
 461   print_raw(attr);
 462   print_raw("='");
 463   object_text(x);
 464   print_raw("'");
 465 }
 466 
 467 void xmlStream::object_text(Handle x) {
 468   assert_if_no_error(inside_attrs(), "printing attributes");
 469   if (x == NULL)  return;
 470   oopDesc::print_value_on(text(), x());
 471 }
 472 
 473 
 474 void xmlStream::object(const char* attr, Metadata* x) {
 475   assert_if_no_error(inside_attrs(), "printing attributes");
 476   if (x == NULL)  return;
 477   print_raw(" ");
 478   print_raw(attr);
 479   print_raw("='");
 480   object_text(x);
 481   print_raw("'");
 482 }
 483 
 484 void xmlStream::object_text(Metadata* x) {
 485   assert_if_no_error(inside_attrs(), "printing attributes");
 486   if (x == NULL)  return;
 487   //x->print_value_on(text());
 488   if (x->is_method())
 489     method_text((Method*)x);
 490   else if (x->is_klass())


< prev index next >