diff --git a/src/jdk.jfr/share/classes/jdk/jfr/Name.java b/src/jdk.jfr/share/classes/jdk/jfr/Name.java index 5f946783364..7c43911f01c 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/Name.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/Name.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,13 +31,37 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Annotation that overrides the default name for an element (for example, when - * the default package for an event is not appropriate). + * Annotation that sets the default name for an element. *

- * The name must be a valid identifiers in the Java language (for example, - * {@code "com.example.MyEvent"} for an event class or {@code "message"} for an - * event field). - * + * The name must be a valid identifier as specified in the Java language (for + * example, {@code "com.example.Transaction"} for an event class or + * {@code "message"} for an event field). + *

+ * A stable and easy-to-use event name is of the form: + *

+ * {@code [org|com|net].[organization|product].EventName} + *

+ * Events without a {@code @Name} annotation get their name from the fully + * qualified class name, which works well for experimentation but should be + * avoided in production. + *

* @since 9 */ @Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD})