jdk.jfr.ContentType Java Examples
The following examples show how to use
jdk.jfr.ContentType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestContentType.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { EventType t = EventType.getEventType(SunnyDay.class); AnnotationElement aMax = Events.getAnnotation(t.getField("max"), Temperature.class); ContentType cMax = aMax.getAnnotation(ContentType.class); if (cMax == null) { throw new Exception("Expected Temperature annotation for field 'max' to have meta annotation ContentType"); } AnnotationElement aHours = Events.getAnnotation(t.getField("hours"), Timespan.class); ContentType cHours = aHours.getAnnotation(ContentType.class); Asserts.assertTrue(cHours != null, "Expected Timespan annotation for field 'hours' to have meta annotation ContentType"); }
Example #2
Source File: TestContentType.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { EventType t = EventType.getEventType(SunnyDay.class); AnnotationElement aMax = Events.getAnnotation(t.getField("max"), Temperature.class); ContentType cMax = aMax.getAnnotation(ContentType.class); if (cMax == null) { throw new Exception("Expected Temperature annotation for field 'max' to have meta annotation ContentType"); } AnnotationElement aHours = Events.getAnnotation(t.getField("hours"), Timespan.class); ContentType cHours = aHours.getAnnotation(ContentType.class); Asserts.assertTrue(cHours != null, "Expected Timespan annotation for field 'hours' to have meta annotation ContentType"); }
Example #3
Source File: TestContentType.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) throws Exception { EventType t = EventType.getEventType(SunnyDay.class); AnnotationElement aMax = Events.getAnnotation(t.getField("max"), Temperature.class); ContentType cMax = aMax.getAnnotation(ContentType.class); if (cMax == null) { throw new Exception("Expected Temperature annotation for field 'max' to have meta annotation ContentType"); } AnnotationElement aHours = Events.getAnnotation(t.getField("hours"), Timespan.class); ContentType cHours = aHours.getAnnotation(ContentType.class); Asserts.assertTrue(cHours != null, "Expected Timespan annotation for field 'hours' to have meta annotation ContentType"); }