KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > aspectwerkz > transform > inlining > deployer > ChangeSet


1 /**************************************************************************************
2  * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved. *
3  * http://aspectwerkz.codehaus.org *
4  * ---------------------------------------------------------------------------------- *
5  * The software in this package is published under the terms of the LGPL license *
6  * a copy of which has been included with this distribution in the license.txt file. *
7  **************************************************************************************/

8 package org.codehaus.aspectwerkz.transform.inlining.deployer;
9
10 import java.util.Set JavaDoc;
11 import java.util.HashSet JavaDoc;
12
13 import org.codehaus.aspectwerkz.transform.inlining.compiler.CompilationInfo;
14 import org.codehaus.aspectwerkz.transform.inlining.compiler.MatchingJoinPointInfo;
15
16 /**
17  * Represents a change set of changes to be made to the class graph.
18  *
19  * @author <a HREF="mailto:jboner@codehaus.org">Jonas BonŽr </a>
20  */

21 public final class ChangeSet {
22     private final Set JavaDoc m_set = new HashSet JavaDoc();
23
24     /**
25      * Adds a change set element.
26      *
27      * @param element
28      */

29     public void addElement(final Element element) {
30         m_set.add(element);
31     }
32
33     /**
34      * Returns all elements in the change set.
35      *
36      * @return all elements in the change set
37      */

38     public Set JavaDoc getElements() {
39         return m_set;
40     }
41
42     /**
43      * Represents a change to be made to the class graph.
44      *
45      * @author <a HREF="mailto:jboner@codehaus.org">Jonas BonŽr </a>
46      */

47     public static class Element {
48         private final CompilationInfo m_compilationInfo;
49         private final MatchingJoinPointInfo m_joinPointInfo;
50
51         public Element(final CompilationInfo compilationInfo, final MatchingJoinPointInfo joinPointInfo) {
52             m_compilationInfo = compilationInfo;
53             m_joinPointInfo = joinPointInfo;
54         }
55
56         public CompilationInfo getCompilationInfo() {
57             return m_compilationInfo;
58         }
59
60         public MatchingJoinPointInfo getJoinPointInfo() {
61             return m_joinPointInfo;
62         }
63     }
64 }
Popular Tags