EMMA Coverage Report (generated Thu Dec 06 15:52:10 GMT 2007)
[all classes][com.sun.source.util]

COVERAGE SUMMARY FOR SOURCE FILE [TaskEvent.java]

nameclass, %method, %block, %line, %
TaskEvent.java0%   (0/2)0%   (0/14)0%   (0/157)0%   (0/26)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TaskEvent0%   (0/1)0%   (0/10)0%   (0/79)0%   (0/19)
TaskEvent (TaskEvent$Kind): void 0%   (0/1)0%   (0/7)0%   (0/2)
TaskEvent (TaskEvent$Kind, CompilationUnitTree): void 0%   (0/1)0%   (0/8)0%   (0/2)
TaskEvent (TaskEvent$Kind, CompilationUnitTree, TypeElement): void 0%   (0/1)0%   (0/8)0%   (0/2)
TaskEvent (TaskEvent$Kind, JavaFileObject): void 0%   (0/1)0%   (0/7)0%   (0/2)
TaskEvent (TaskEvent$Kind, JavaFileObject, CompilationUnitTree, TypeElement):... 0%   (0/1)0%   (0/15)0%   (0/6)
getCompilationUnit (): CompilationUnitTree 0%   (0/1)0%   (0/3)0%   (0/1)
getKind (): TaskEvent$Kind 0%   (0/1)0%   (0/3)0%   (0/1)
getSourceFile (): JavaFileObject 0%   (0/1)0%   (0/3)0%   (0/1)
getTypeElement (): TypeElement 0%   (0/1)0%   (0/3)0%   (0/1)
toString (): String 0%   (0/1)0%   (0/22)0%   (0/1)
     
class TaskEvent$Kind0%   (0/1)0%   (0/4)0%   (0/78)0%   (0/7)
<static initializer> 0%   (0/1)0%   (0/64)0%   (0/7)
TaskEvent$Kind (String, int): void 0%   (0/1)0%   (0/5)0%   (0/1)
valueOf (String): TaskEvent$Kind 0%   (0/1)0%   (0/5)0%   (0/1)
values (): TaskEvent$Kind [] 0%   (0/1)0%   (0/4)0%   (0/1)

1/*
2 * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.  Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25 
26package com.sun.source.util;
27 
28import com.sun.source.tree.CompilationUnitTree;
29import javax.lang.model.element.TypeElement;
30import javax.tools.JavaFileObject;
31 
32/**
33 * Provides details about work that has been done by the Sun Java Compiler, javac.
34 *
35 * @author Jonathan Gibbons
36 * @since 1.6
37 */
38public final class TaskEvent
39{
40    /**
41     * Kind of task event.
42     * @since 1.6
43     */
44    public enum Kind {
45        /**
46         * For events related to the parsing of a file.
47         */
48        PARSE,
49        /**
50         * For events relating to elements being entered.
51         **/
52        ENTER,
53        /**
54         * For events relating to elements being analyzed for errors.
55         **/
56        ANALYZE,
57        /**
58         * For events relating to class files being generated.
59         **/
60        GENERATE,
61        /**
62         * For events relating to overall annotaion processing.
63         **/
64        ANNOTATION_PROCESSING,
65        /**
66         * For events relating to an individual annotation processing round.
67         **/
68        ANNOTATION_PROCESSING_ROUND
69    };
70 
71    public TaskEvent(Kind kind) {
72        this(kind, null, null, null);
73    }
74 
75    public TaskEvent(Kind kind, JavaFileObject sourceFile) {
76        this(kind, sourceFile, null, null);
77    }
78 
79    public TaskEvent(Kind kind, CompilationUnitTree unit) {
80        this(kind, unit.getSourceFile(), unit, null);
81    }
82 
83    public TaskEvent(Kind kind, CompilationUnitTree unit, TypeElement clazz) {
84        this(kind, unit.getSourceFile(), unit, clazz);
85    }
86 
87    private TaskEvent(Kind kind, JavaFileObject file, CompilationUnitTree unit, TypeElement clazz) {
88        this.kind = kind;
89        this.file = file;
90        this.unit = unit;
91        this.clazz = clazz;
92    }
93 
94    public Kind getKind() {
95        return kind;
96    }
97 
98    public JavaFileObject getSourceFile() {
99        return file;
100    }
101 
102    public CompilationUnitTree getCompilationUnit() {
103        return unit;
104    }
105 
106    public TypeElement getTypeElement() {
107        return clazz;
108    }
109 
110    public String toString() {
111        return "TaskEvent["
112            + kind + ","
113            + file + ","
114            // the compilation unit is identified by the file
115            + clazz + "]";
116    }
117 
118    private Kind kind;
119    private JavaFileObject file;
120    private CompilationUnitTree unit;
121    private TypeElement clazz;
122}

[all classes][com.sun.source.util]
EMMA 2.0.5312 (C) Vladimir Roubtsov