You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/07/04 09:34:52 UTC

svn commit: r791071 - /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Const.java

Author: mturk
Date: Sat Jul  4 07:34:52 2009
New Revision: 791071

URL: http://svn.apache.org/viewvc?rev=791071&view=rev
Log:
Document Const Annotation

Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Const.java

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Const.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Const.java?rev=791071&r1=791070&r2=791071&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Const.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Const.java Sat Jul  4 07:34:52 2009
@@ -20,8 +20,26 @@
 /**
  * Annotation that represents the const type.
  * <p>
- * TODO: Describe Const usage
+ * Not very much usable except for documenting the source
+ * until {@code JSR-308} comes out. The intention is to have something
+ * like this:
  * </p>
+ * <pre>
+ * {@code @Const} Pointer p = new MyPointer();
+ * ...
+ * use p as read only pointer.
+ * ...
+ * </pre>
+ * </p>
+ * This is currently done by explicity creating the {@code ConstPointer}
+ * </p>
+ * <pre>
+ * Pointer p = new MyConstPointer();
+ * ...
+ * use p as read only pointer.
+ * ...
+ * </pre>
+ *
  * @since Runtime 1.0
  */
 @Retention(RetentionPolicy.RUNTIME)