01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.aspectwerkz.transform.inlining.deployer;
05:
06: import java.util.Set;
07: import java.util.HashSet;
08:
09: import com.tc.aspectwerkz.transform.inlining.compiler.CompilationInfo;
10: import com.tc.aspectwerkz.transform.inlining.compiler.MatchingJoinPointInfo;
11:
12: /**
13: * Represents a change set of changes to be made to the class graph.
14: *
15: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
16: */
17: public final class ChangeSet {
18: private final Set m_set = new HashSet();
19:
20: /**
21: * Adds a change set element.
22: *
23: * @param element
24: */
25: public void addElement(final Element element) {
26: m_set.add(element);
27: }
28:
29: /**
30: * Returns all elements in the change set.
31: *
32: * @return all elements in the change set
33: */
34: public Set getElements() {
35: return m_set;
36: }
37:
38: /**
39: * Represents a change to be made to the class graph.
40: *
41: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
42: */
43: public static class Element {
44: private final CompilationInfo m_compilationInfo;
45: private final MatchingJoinPointInfo m_joinPointInfo;
46:
47: public Element(final CompilationInfo compilationInfo,
48: final MatchingJoinPointInfo joinPointInfo) {
49: m_compilationInfo = compilationInfo;
50: m_joinPointInfo = joinPointInfo;
51: }
52:
53: public CompilationInfo getCompilationInfo() {
54: return m_compilationInfo;
55: }
56:
57: public MatchingJoinPointInfo getJoinPointInfo() {
58: return m_joinPointInfo;
59: }
60: }
61: }
|