src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordedClassLoader.java
changeset 58863 c16ac7a2eba4
parent 50113 caf115bb98ad
equal deleted inserted replaced
58861:2c3cc4b01880 58863:c16ac7a2eba4
     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
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package jdk.jfr.consumer;
    26 package jdk.jfr.consumer;
    27 
    27 
    28 import java.util.List;
    28 import jdk.jfr.internal.consumer.ObjectContext;
    29 
       
    30 import jdk.jfr.ValueDescriptor;
       
    31 import jdk.jfr.internal.Type;
       
    32 
    29 
    33 /**
    30 /**
    34  * A recorded Java class loader.
    31  * A recorded Java class loader.
    35  *
    32  *
    36  * @since 9
    33  * @since 9
    37  */
    34  */
    38 public final class RecordedClassLoader extends RecordedObject {
    35 public final class RecordedClassLoader extends RecordedObject {
    39 
       
    40     static ObjectFactory<RecordedClassLoader> createFactory(Type type, TimeConverter timeConverter) {
       
    41         return new ObjectFactory<RecordedClassLoader>(type) {
       
    42             @Override
       
    43             RecordedClassLoader createTyped(List<ValueDescriptor> desc, long id, Object[] object) {
       
    44                 return new RecordedClassLoader(desc, id, object, timeConverter);
       
    45             }
       
    46         };
       
    47     }
       
    48 
       
    49     private final long uniqueId;
    36     private final long uniqueId;
    50 
    37 
    51     // package private
    38     // package private
    52     private RecordedClassLoader(List<ValueDescriptor> descriptors, long id, Object[] values, TimeConverter timeConverter) {
    39     RecordedClassLoader(ObjectContext objectContext, long id, Object[] values) {
    53         super(descriptors, values, timeConverter);
    40         super(objectContext, values);
    54         this.uniqueId = id;
    41         this.uniqueId = id;
    55     }
    42     }
    56 
    43 
    57     /**
    44     /**
    58      * Returns the class of the class loader.
    45      * Returns the class of the class loader.