changeset 54577:fcddff6177b4 intrinsics-project

adding apiNote to IntrinsicsCandidate
author vromero
date Mon, 28 Jan 2019 15:56:58 -0500
parents 845c8bdc6fc3
children 803c31f428ff
files src/java.base/share/classes/java/lang/compiler/IntrinsicCandidate.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/compiler/IntrinsicCandidate.java	Thu Jan 24 17:37:26 2019 -0400
+++ b/src/java.base/share/classes/java/lang/compiler/IntrinsicCandidate.java	Mon Jan 28 15:56:58 2019 -0500
@@ -28,6 +28,11 @@
 
 /**
  * Annotated method is a candidate for compile time optimization.
+ *
+ * @apiNote
+ * This type's retention policy ensures that annotations of this type are not available through the reflection API.
+ * This prevents clients from identifying intrinsic candidates and thus prevents assumptions about the treatment of
+ * intrinsic candidates by a Java compiler. Being an intrinsic candidate is never part of a method's specification.
  */
 @Retention(RetentionPolicy.CLASS)
 @Target({ ElementType.METHOD })