01: /**************************************************************************************
02: * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved. *
03: * http://aspectwerkz.codehaus.org *
04: * ---------------------------------------------------------------------------------- *
05: * The software in this package is published under the terms of the LGPL license *
06: * a copy of which has been included with this distribution in the license.txt file. *
07: **************************************************************************************/package org.codehaus.aspectwerkz.transform.inlining.deployer;
08:
09: import java.util.Set;
10: import java.util.HashSet;
11:
12: import org.codehaus.aspectwerkz.transform.inlining.compiler.CompilationInfo;
13: import org.codehaus.aspectwerkz.transform.inlining.compiler.MatchingJoinPointInfo;
14:
15: /**
16: * Represents a change set of changes to be made to the class graph.
17: *
18: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
19: */
20: public final class ChangeSet {
21: private final Set m_set = new HashSet();
22:
23: /**
24: * Adds a change set element.
25: *
26: * @param element
27: */
28: public void addElement(final Element element) {
29: m_set.add(element);
30: }
31:
32: /**
33: * Returns all elements in the change set.
34: *
35: * @return all elements in the change set
36: */
37: public Set getElements() {
38: return m_set;
39: }
40:
41: /**
42: * Represents a change to be made to the class graph.
43: *
44: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
45: */
46: public static class Element {
47: private final CompilationInfo m_compilationInfo;
48: private final MatchingJoinPointInfo m_joinPointInfo;
49:
50: public Element(final CompilationInfo compilationInfo,
51: 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: }
|