equal
deleted
inserted
replaced
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 method. |
33 * A recorded method. |
36 * |
34 * |
37 * @since 9 |
35 * @since 9 |
38 */ |
36 */ |
39 public final class RecordedMethod extends RecordedObject { |
37 public final class RecordedMethod extends RecordedObject { |
40 |
38 |
41 static ObjectFactory<RecordedMethod> createFactory(Type type, TimeConverter timeConverter) { |
39 // package private |
42 return new ObjectFactory<RecordedMethod>(type) { |
40 RecordedMethod(ObjectContext objectContext, Object[] values) { |
43 @Override |
41 super(objectContext, values); |
44 RecordedMethod createTyped(List<ValueDescriptor> desc, long id, Object[] object) { |
|
45 return new RecordedMethod(desc, object, timeConverter); |
|
46 } |
|
47 }; |
|
48 } |
|
49 |
|
50 private RecordedMethod(List<ValueDescriptor> descriptors, Object[] objects, TimeConverter timeConverter) { |
|
51 super(descriptors, objects, timeConverter); |
|
52 } |
42 } |
53 |
43 |
54 /** |
44 /** |
55 * Returns the class this method belongs to, if it belong to a Java frame. |
45 * Returns the class this method belongs to, if it belong to a Java frame. |
56 * <p> |
46 * <p> |