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; |
|
32 import jdk.jfr.internal.Type; |
30 import jdk.jfr.internal.Type; |
33 |
31 |
34 /** |
32 /** |
35 * A recorded Java type, such as a class or an interface. |
33 * A recorded Java type, such as a class or an interface. |
36 * |
34 * |
37 * @since 9 |
35 * @since 9 |
38 */ |
36 */ |
39 public final class RecordedClass extends RecordedObject { |
37 public final class RecordedClass extends RecordedObject { |
40 |
38 |
41 static ObjectFactory<RecordedClass> createFactory(Type type, TimeConverter timeConverter) { |
39 static ObjectFactory<RecordedClass> createFactory(Type type, TimeConverter timeConverter) { |
42 return new ObjectFactory<RecordedClass>(type) { |
40 return new ObjectFactory<RecordedClass>(type, timeConverter) { |
43 @Override |
41 @Override |
44 RecordedClass createTyped(List<ValueDescriptor> desc, long id, Object[] object) { |
42 RecordedClass createTyped(ObjectContext objectContext, long id, Object[] values) { |
45 return new RecordedClass(desc, id, object, timeConverter); |
43 return new RecordedClass(objectContext, id, values); |
46 } |
44 } |
47 }; |
45 }; |
48 } |
46 } |
49 |
47 |
50 private final long uniqueId; |
48 private final long uniqueId; |
51 |
49 |
52 // package private |
50 // package private |
53 private RecordedClass(List<ValueDescriptor> descriptors, long id, Object[] values, TimeConverter timeConverter) { |
51 private RecordedClass(ObjectContext objectContext, long id, Object[] values) { |
54 super(descriptors, values, timeConverter); |
52 super(objectContext, values); |
55 this.uniqueId = id; |
53 this.uniqueId = id; |
56 } |
54 } |
57 |
55 |
58 /** |
56 /** |
59 * Returns the modifiers of the class. |
57 * Returns the modifiers of the class. |