1 /* |
1 /* |
2 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
24 */ |
24 */ |
25 |
25 |
26 package jdk.jfr.consumer; |
26 package jdk.jfr.consumer; |
27 |
27 |
28 import java.lang.reflect.Modifier; |
28 import java.lang.reflect.Modifier; |
29 import java.util.List; |
|
30 |
29 |
31 import jdk.jfr.ValueDescriptor; |
30 import jdk.jfr.internal.consumer.ObjectContext; |
32 import jdk.jfr.internal.Type; |
|
33 |
31 |
34 /** |
32 /** |
35 * A recorded frame in a stack trace. |
33 * A recorded frame in a stack trace. |
36 * |
34 * |
37 * @since 9 |
35 * @since 9 |
38 */ |
36 */ |
39 public final class RecordedFrame extends RecordedObject { |
37 public final class RecordedFrame extends RecordedObject { |
40 |
|
41 static ObjectFactory<RecordedFrame> createFactory(Type type, TimeConverter timeConverter) { |
|
42 return new ObjectFactory<RecordedFrame>(type) { |
|
43 @Override |
|
44 RecordedFrame createTyped(List<ValueDescriptor> desc, long id, Object[] object) { |
|
45 return new RecordedFrame(desc, object, timeConverter); |
|
46 } |
|
47 }; |
|
48 } |
|
49 |
|
50 // package private |
38 // package private |
51 RecordedFrame(List<ValueDescriptor> desc, Object[] objects, TimeConverter timeConverter) { |
39 RecordedFrame(ObjectContext objectContext, Object[] values) { |
52 super(desc, objects, timeConverter); |
40 super(objectContext, values); |
53 } |
41 } |
54 |
42 |
55 /** |
43 /** |
56 * Returns {@code true} if this is a Java frame, {@code false} otherwise. |
44 * Returns {@code true} if this is a Java frame, {@code false} otherwise. |
57 * <p> |
45 * <p> |