langtools/src/share/classes/com/sun/source/util/TaskEvent.java
changeset 25287 d2440361b323
parent 24898 88fa65d2ac87
--- a/langtools/src/share/classes/com/sun/source/util/TaskEvent.java	Wed Jun 25 17:58:37 2014 -0700
+++ b/langtools/src/share/classes/com/sun/source/util/TaskEvent.java	Wed Jun 25 19:04:52 2014 -0700
@@ -79,18 +79,45 @@
         COMPILATION,
     }
 
+    /**
+     * Creates a task event for a given kind.
+     * The source file, compilation unit and type element
+     * are all set to {@code null}.
+     * @param kind the kind of the event
+     */
     public TaskEvent(Kind kind) {
         this(kind, null, null, null);
     }
 
+    /**
+     * Creates a task event for a given kind and source file.
+     * The compilation unit and type element are both set to {@code null}.
+     * @param kind the kind of the event
+     * @param sourceFile the source file
+     */
     public TaskEvent(Kind kind, JavaFileObject sourceFile) {
         this(kind, sourceFile, null, null);
     }
 
+    /**
+     * Creates a task event for a given kind and compilation unit.
+     * The source file is set from the compilation unit,
+     * and the type element is set to {@code null}.
+     * @param kind the kind of the event
+     * @param unit the compilation unit
+     */
     public TaskEvent(Kind kind, CompilationUnitTree unit) {
         this(kind, unit.getSourceFile(), unit, null);
     }
 
+    /**
+     * Creates a task event for a given kind, compilation unit
+     * and type element.
+     * The source file is set from the compilation unit.
+     * @param kind the kind of the event
+     * @param unit the compilation unit
+     * @param clazz the type element
+     */
     public TaskEvent(Kind kind, CompilationUnitTree unit, TypeElement clazz) {
         this(kind, unit.getSourceFile(), unit, clazz);
     }
@@ -102,22 +129,42 @@
         this.clazz = clazz;
     }
 
+    /**
+     * Returns the kind for this event.
+     * @return the kind
+     */
     public Kind getKind() {
         return kind;
     }
 
+    /**
+     * Returns the source file for this event.
+     * May be {@code null}.
+     * @return the source file
+     */
     public JavaFileObject getSourceFile() {
         return file;
     }
 
+    /**
+     * Returns the compilation unit for this event.
+     * May be {@code null}.
+     * @return the compilation unit
+     */
     public CompilationUnitTree getCompilationUnit() {
         return unit;
     }
 
+    /**
+     * Returns the type element for this event.
+     * May be {@code null}.
+     * @return the type element
+     */
     public TypeElement getTypeElement() {
         return clazz;
     }
 
+    @Override
     public String toString() {
         return "TaskEvent["
             + kind + ","