< prev index next >

test/jdk/jdk/jfr/api/event/dynamic/TestDynamicAnnotations.java

Print this page
rev 51054 : imported patch 9000013-aixDisableJFR-requires.patch


  34 import java.util.Collections;
  35 import java.util.HashMap;
  36 import java.util.List;
  37 import java.util.Map;
  38 
  39 import jdk.jfr.AnnotationElement;
  40 import jdk.jfr.Category;
  41 import jdk.jfr.Description;
  42 import jdk.jfr.Event;
  43 import jdk.jfr.EventFactory;
  44 import jdk.jfr.EventType;
  45 import jdk.jfr.Label;
  46 import jdk.jfr.MetadataDefinition;
  47 import jdk.jfr.Name;
  48 import jdk.jfr.Recording;
  49 import jdk.jfr.Relational;
  50 import jdk.jfr.ValueDescriptor;
  51 import jdk.jfr.consumer.RecordedEvent;
  52 import jdk.test.lib.jfr.Events;
  53 
  54 /*
  55  * @test
  56  * @key jfr

  57  * @library /test/lib
  58  * @run main/othervm jdk.jfr.api.event.dynamic.TestDynamicAnnotations
  59  */
  60 public class TestDynamicAnnotations {
  61 
  62     @Label("Execution Context Id")
  63     @Description("A unique identifier to correlate events or requests associated with the same task across several components")
  64     @Relational
  65     @MetadataDefinition
  66     @Target(ElementType.FIELD)
  67     @Retention(RetentionPolicy.RUNTIME)
  68     private @interface ECID {
  69     }
  70 
  71     @MetadataDefinition
  72     @Target({ ElementType.FIELD, ElementType.TYPE })
  73     @Retention(RetentionPolicy.RUNTIME)
  74     private @interface Array {
  75         String[] stringArray();
  76 




  34 import java.util.Collections;
  35 import java.util.HashMap;
  36 import java.util.List;
  37 import java.util.Map;
  38 
  39 import jdk.jfr.AnnotationElement;
  40 import jdk.jfr.Category;
  41 import jdk.jfr.Description;
  42 import jdk.jfr.Event;
  43 import jdk.jfr.EventFactory;
  44 import jdk.jfr.EventType;
  45 import jdk.jfr.Label;
  46 import jdk.jfr.MetadataDefinition;
  47 import jdk.jfr.Name;
  48 import jdk.jfr.Recording;
  49 import jdk.jfr.Relational;
  50 import jdk.jfr.ValueDescriptor;
  51 import jdk.jfr.consumer.RecordedEvent;
  52 import jdk.test.lib.jfr.Events;
  53 
  54 /**
  55  * @test
  56  * @key jfr
  57  * @requires vm.hasJFR
  58  * @library /test/lib
  59  * @run main/othervm jdk.jfr.api.event.dynamic.TestDynamicAnnotations
  60  */
  61 public class TestDynamicAnnotations {
  62 
  63     @Label("Execution Context Id")
  64     @Description("A unique identifier to correlate events or requests associated with the same task across several components")
  65     @Relational
  66     @MetadataDefinition
  67     @Target(ElementType.FIELD)
  68     @Retention(RetentionPolicy.RUNTIME)
  69     private @interface ECID {
  70     }
  71 
  72     @MetadataDefinition
  73     @Target({ ElementType.FIELD, ElementType.TYPE })
  74     @Retention(RetentionPolicy.RUNTIME)
  75     private @interface Array {
  76         String[] stringArray();
  77 


< prev index next >