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 |
27 |
27 |
28 import java.util.Arrays; |
28 import java.util.Arrays; |
29 import java.util.Collections; |
29 import java.util.Collections; |
30 import java.util.List; |
30 import java.util.List; |
31 |
31 |
32 import jdk.jfr.ValueDescriptor; |
32 import jdk.jfr.internal.consumer.ObjectContext; |
33 import jdk.jfr.internal.Type; |
|
34 |
33 |
35 /** |
34 /** |
36 * A recorded stack trace. |
35 * A recorded stack trace. |
37 * |
36 * |
38 * @since 9 |
37 * @since 9 |
39 */ |
38 */ |
40 public final class RecordedStackTrace extends RecordedObject { |
39 public final class RecordedStackTrace extends RecordedObject { |
41 |
40 // package private |
42 static ObjectFactory<RecordedStackTrace> createFactory(Type type, TimeConverter timeConverter) { |
41 RecordedStackTrace(ObjectContext objectContext, Object[] values) { |
43 return new ObjectFactory<RecordedStackTrace>(type) { |
42 super(objectContext, values); |
44 @Override |
|
45 RecordedStackTrace createTyped(List<ValueDescriptor> desc, long id, Object[] object) { |
|
46 return new RecordedStackTrace(desc, object, timeConverter); |
|
47 } |
|
48 }; |
|
49 } |
|
50 |
|
51 private RecordedStackTrace(List<ValueDescriptor> desc, Object[] values, TimeConverter timeConverter) { |
|
52 super(desc, values, timeConverter); |
|
53 } |
43 } |
54 |
44 |
55 /** |
45 /** |
56 * Returns the frames in the stack trace. |
46 * Returns the frames in the stack trace. |
57 * |
47 * |