commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r791071 - /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Const.java
Date Sat, 04 Jul 2009 07:34:52 GMT
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)



Mime
View raw message