changeset 15628:4e9176d70690

add documentation to HotSpotVM* annotatations
author twisti
date Tue, 13 May 2014 14:13:15 -0700
parents 4612497da67f
children 55be15d24e45
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConstant.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMField.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMFlag.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMType.java
diffstat 4 files changed, 75 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConstant.java	Mon May 12 17:44:23 2014 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConstant.java	Tue May 13 14:13:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -24,10 +24,18 @@
 
 import java.lang.annotation.*;
 
+/**
+ * Refers to a C++ constant in the VM.
+ */
 @Target(ElementType.FIELD)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface HotSpotVMConstant {
 
+    /**
+     * Returns the name of the constant.
+     *
+     * @return name of constant
+     */
     String name();
 
     /**
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMField.java	Mon May 12 17:44:23 2014 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMField.java	Tue May 13 14:13:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -24,21 +24,53 @@
 
 import java.lang.annotation.*;
 
+/**
+ * Refers to a C++ field in the VM.
+ */
 @Target(ElementType.FIELD)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface HotSpotVMField {
 
+    /**
+     * Types of information this annotation can return.
+     */
     enum Type {
+        /**
+         * Returns the offset of this field within the type. Only valid for instance fields.
+         */
         OFFSET,
+
+        /**
+         * Returns the absolute address of this field. Only valid for static fields.
+         */
         ADDRESS,
+
+        /**
+         * Returns the value of this field. Only valid for static fields.
+         */
         VALUE;
     }
 
-    String name();
+    /**
+     * Specifies what type of information to return.
+     *
+     * @see Type
+     */
+    Type get();
 
+    /**
+     * Returns the type name containing this field.
+     *
+     * @return name of containing type
+     */
     String type();
 
-    Type get();
+    /**
+     * Returns the name of this field.
+     *
+     * @return name of field
+     */
+    String name();
 
     /**
      * List of architectures where this constant is required. Names are derived from
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMFlag.java	Mon May 12 17:44:23 2014 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMFlag.java	Tue May 13 14:13:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -24,10 +24,18 @@
 
 import java.lang.annotation.*;
 
+/**
+ * Refers to a C++ flag in the VM.
+ */
 @Target(ElementType.FIELD)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface HotSpotVMFlag {
 
+    /**
+     * Returns the name of this flag.
+     *
+     * @return name of flag.
+     */
     String name();
 
     /**
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMType.java	Mon May 12 17:44:23 2014 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMType.java	Tue May 13 14:13:15 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -24,15 +24,34 @@
 
 import java.lang.annotation.*;
 
+/**
+ * Refers to a C++ type in the VM.
+ */
 @Target(ElementType.FIELD)
 @Retention(RetentionPolicy.RUNTIME)
 public @interface HotSpotVMType {
 
+    /**
+     * Types of information this annotation can return.
+     */
     enum Type {
+        /**
+         * Returns the size of the type (C++ {@code sizeof()}).
+         */
         SIZE;
     }
 
-    String name();
+    /**
+     * Specifies what type of information to return.
+     *
+     * @see Type
+     */
+    Type get();
 
-    Type get();
+    /**
+     * Returns the name of the type.
+     *
+     * @return name of type
+     */
+    String name();
 }