* src/vmcore/annotation.c: Improved comments.
[cacao.git] / src / lib / gnu / java / lang / reflect / Field.java
index e8889a859d9230edf88c098bcac4884f5df7799e..39856a374d7efcbac9bf31dafb147490ee31a35d 100644 (file)
@@ -85,7 +85,16 @@ extends AccessibleObject implements Member
   private Class clazz;
   private String name;
   private int slot;
+
+  /**
+   * Unparsed annotations.
+   */
   private byte[] annotations = null;
+
+  /**
+   * Annotations get parsed the first time they are
+   * accessed and are then cached it this map.
+   */
   private transient Map<Class<? extends Annotation>, Annotation> declaredAnnotations = null;
 
   private static final int FIELD_MODIFIERS
@@ -93,6 +102,9 @@ extends AccessibleObject implements Member
       | Modifier.PUBLIC | Modifier.STATIC | Modifier.TRANSIENT
       | Modifier.VOLATILE;
 
+  /**
+   * Helper array for creating a new array from a java.util.Container.
+   */
   private static final Annotation[] EMPTY_ANNOTATIONS_ARRAY =
     new Annotation[0];
 
@@ -686,5 +698,9 @@ extends AccessibleObject implements Member
     return declaredAnnotations().values().toArray(EMPTY_ANNOTATIONS_ARRAY);
   }
 
+  /**
+   * Parses the annotations if they aren't parsed yet and stores them into
+   * the declaredAnnotations map and return this map.
+   */
   private synchronized native Map<Class<? extends Annotation>, Annotation> declaredAnnotations();
 }