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;
08:
09: import org.codehaus.aspectwerkz.definition.AspectDefinition;
10: import org.codehaus.aspectwerkz.DeploymentModel;
11: import org.codehaus.aspectwerkz.DeploymentModel;
12:
13: /**
14: * TODO docuemnt
15: *
16: * @author <a href="mailto:alex@gnilux.com">Alexandre Vasseur</a>
17: */
18: public class AspectInfo {
19: private final AspectDefinition m_aspectDefinition;//FIXME - remove this dependancie
20: private final String m_aspectQualifiedName;
21: private final String m_aspectFieldName;
22: private final String m_aspectClassName;
23: private final String m_aspectClassSignature;
24: private final DeploymentModel m_deploymentModel;
25:
26: public AspectInfo(final AspectDefinition aspectDefinition,
27: final String aspectFieldName, final String aspectClassName,
28: final String aspectClassSignature) {
29: m_aspectDefinition = aspectDefinition;
30: m_aspectQualifiedName = aspectDefinition.getQualifiedName();
31: m_aspectFieldName = aspectFieldName;
32: m_aspectClassName = aspectClassName;
33: m_aspectClassSignature = aspectClassSignature;
34: m_deploymentModel = aspectDefinition.getDeploymentModel();
35: }
36:
37: public AspectDefinition getAspectDefinition() {
38: return m_aspectDefinition;
39: }
40:
41: public String getAspectClassName() {
42: return m_aspectClassName;
43: }
44:
45: public String getAspectQualifiedName() {
46: return m_aspectQualifiedName;
47: }
48:
49: public DeploymentModel getDeploymentModel() {
50: return m_deploymentModel;
51: }
52:
53: public String getAspectFieldName() {
54: return m_aspectFieldName;
55: }
56:
57: public String getAspectClassSignature() {
58: return m_aspectClassSignature;
59: }
60:
61: public boolean equals(Object o) {
62: //TODO should we use AspectDef instead ??
63: if (this == o) {
64: return true;
65: }
66: if (!(o instanceof AspectInfo)) {
67: return false;
68: }
69:
70: final AspectInfo aspectInfo = (AspectInfo) o;
71:
72: if (!m_aspectQualifiedName
73: .equals(aspectInfo.m_aspectQualifiedName)) {
74: return false;
75: }
76:
77: return true;
78: }
79:
80: public int hashCode() {
81: return m_aspectQualifiedName.hashCode();
82: }
83: }
|