16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.jfr.api.event;
27
28 import jdk.jfr.Event;
29 import jdk.jfr.EventType;
30 import jdk.jfr.Recording;
31 import jdk.jfr.ValueDescriptor;
32 import jdk.jfr.consumer.RecordedEvent;
33 import jdk.test.lib.Asserts;
34 import jdk.test.lib.jfr.Events;
35
36 /*
37 * @test
38 * @summary Test with event class inheritance
39 * @key jfr
40 * @library /test/lib
41 * @run main/othervm jdk.jfr.api.event.TestExtends
42 */
43
44 public class TestExtends {
45
46 private static final int DEFAULT_FIELD_COUNT = 4;
47
48 @SuppressWarnings("unused")
49 private static class GrandpaEvent extends Event {
50 public int gPublicField = 4;
51 protected int gProtectedField = 3;
52 private int gPrivateField = 2;
53 int gDefaultField = 1;
54 private int hiddenField = 4711;
55 }
56
57 @SuppressWarnings("unused")
58 private static class ParentEvent extends GrandpaEvent {
59 public int pPublicField = 40;
|
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package jdk.jfr.api.event;
27
28 import jdk.jfr.Event;
29 import jdk.jfr.EventType;
30 import jdk.jfr.Recording;
31 import jdk.jfr.ValueDescriptor;
32 import jdk.jfr.consumer.RecordedEvent;
33 import jdk.test.lib.Asserts;
34 import jdk.test.lib.jfr.Events;
35
36 /**
37 * @test
38 * @summary Test with event class inheritance
39 * @key jfr
40 * @requires vm.hasJFR
41 * @library /test/lib
42 * @run main/othervm jdk.jfr.api.event.TestExtends
43 */
44
45 public class TestExtends {
46
47 private static final int DEFAULT_FIELD_COUNT = 4;
48
49 @SuppressWarnings("unused")
50 private static class GrandpaEvent extends Event {
51 public int gPublicField = 4;
52 protected int gProtectedField = 3;
53 private int gPrivateField = 2;
54 int gDefaultField = 1;
55 private int hiddenField = 4711;
56 }
57
58 @SuppressWarnings("unused")
59 private static class ParentEvent extends GrandpaEvent {
60 public int pPublicField = 40;
|