src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordedClass.java
branchJEP-349-branch
changeset 57460 bcbc53560c77
parent 50113 caf115bb98ad
child 58112 e7754025004b
equal deleted inserted replaced
57459:df39f8d8f4d6 57460:bcbc53560c77
    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.