KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > apt > core > internal > env > EclipseRoundCompleteEvent


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 BEA Systems, Inc.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * tyeung@bea.com - initial implementation.
10  *******************************************************************************/

11 package org.eclipse.jdt.apt.core.internal.env;
12
13
14 import com.sun.mirror.apt.RoundCompleteEvent;
15 import com.sun.mirror.apt.RoundState;
16
17 public class EclipseRoundCompleteEvent extends RoundCompleteEvent
18 {
19     static final long serialVersionUID = 0;
20     
21     public EclipseRoundCompleteEvent(final BuildEnv env)
22     {
23         super( env, new State(env) );
24     }
25     
26     private static class State implements RoundState
27     {
28         private final BuildEnv _env;
29         State(BuildEnv env){ _env = env; }
30         public boolean classFilesCreated() { return _env.hasGeneratedClassFiles(); }
31         public boolean errorRaised() { return _env.hasRaisedErrors(); }
32         public boolean sourceFilesCreated() { return _env.hasGeneratedSourceFiles(); }
33         public boolean finalRound() {
34             // apt terminates when there are no new generated source files
35
return !_env.hasGeneratedSourceFiles();
36         }
37     }
38 }
39
Popular Tags