01: /*
02: * @(#)RoundCompleteEvent.java 1.2 04/07/19
03: *
04: * Copyright (c) 2004, Sun Microsystems, Inc.
05: * All rights reserved.
06: *
07: * Redistribution and use in source and binary forms, with or without
08: * modification, are permitted provided that the following conditions are met:
09: *
10: * * Redistributions of source code must retain the above copyright
11: * notice, this list of conditions and the following disclaimer.
12: * * Redistributions in binary form must reproduce the above copyright
13: * notice, this list of conditions and the following disclaimer in the
14: * documentation and/or other materials provided with the distribution.
15: * * Neither the name of the Sun Microsystems, Inc. nor the names of
16: * its contributors may be used to endorse or promote products derived from
17: * this software without specific prior written permission.
18: *
19: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20: * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21: * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22: * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
23: * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24: * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26: * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27: * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28: * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29: * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30: */
31:
32: package com.sun.mirror.apt;
33:
34: /**
35: * Event for the completion of a round of annotation processing.
36: *
37: * <p>While this class extends the serializable <tt>EventObject</tt>, it
38: * cannot meaningfully be serialized because all of the annotation
39: * processing tool's internal state would potentially be needed.
40: *
41: * @author Joseph D. Darcy
42: * @author Scott Seligman
43: * @version 1.2 04/07/19
44: * @since 1.5
45: */
46: public abstract class RoundCompleteEvent extends java.util.EventObject {
47: private RoundState rs;
48:
49: /**
50: * The current <tt>AnnotationProcessorEnvironment</tt> is regarded
51: * as the source of events.
52: *
53: * @param source The source of events
54: * @param rs The state of the round
55: */
56: protected RoundCompleteEvent(AnnotationProcessorEnvironment source,
57: RoundState rs) {
58: super (source);
59: this .rs = rs;
60: }
61:
62: /**
63: * Return round state.
64: */
65: public RoundState getRoundState() {
66: return rs;
67: }
68:
69: /**
70: * Return source.
71: */
72: public AnnotationProcessorEnvironment getSource() {
73: return (AnnotationProcessorEnvironment) super.getSource();
74: }
75: }
|