< prev index next >
src/hotspot/share/oops/metadata.hpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -54,22 +54,15 @@
virtual void metaspace_pointers_do(MetaspaceClosure* iter) {}
void print() const { print_on(tty); }
void print_value() const { print_value_on(tty); }
- void print_maybe_null() const { print_on_maybe_null(tty); }
- void print_on_maybe_null(outputStream* st) const {
- if (this == NULL)
+ static void print_value_on_maybe_null(outputStream* st, const Metadata* m) {
+ if (m == NULL)
st->print("NULL");
else
- print_on(st);
- }
- void print_value_on_maybe_null(outputStream* st) const {
- if (this == NULL)
- st->print("NULL");
- else
- print_value_on(st);
+ m->print_value_on(st);
}
virtual void print_on(outputStream* st) const; // First level print
virtual void print_value_on(outputStream* st) const = 0; // Second level print
< prev index next >