KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > aspectwerkz > transform > inlining > AspectInfo


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.aspectwerkz.transform.inlining;
5
6
7 import com.tc.aspectwerkz.DeploymentModel;
8 import com.tc.aspectwerkz.aspect.container.AspectFactoryManager;
9 import com.tc.aspectwerkz.definition.AspectDefinition;
10 import com.tc.aspectwerkz.transform.inlining.spi.AspectModel;
11
12 /**
13  * TODO docuemnt
14  *
15  * @author <a HREF="mailto:alex@gnilux.com">Alexandre Vasseur</a>
16  */

17 public class AspectInfo {
18   private final AspectDefinition m_aspectDefinition;//TODO - remove this dependancie
19
private final String JavaDoc m_aspectQualifiedName;
20   private final String JavaDoc m_aspectFieldName;
21   private final String JavaDoc m_aspectClassName;
22   private final String JavaDoc m_aspectClassSignature;
23   private final String JavaDoc m_aspectFactoryClassName;
24   private final DeploymentModel m_deploymentModel;
25
26   private AspectModel m_aspectModel;
27
28   public AspectInfo(final AspectDefinition aspectDefinition,
29                     final String JavaDoc aspectFieldName,
30                     final String JavaDoc aspectClassName,
31                     final String JavaDoc aspectClassSignature) {
32     m_aspectDefinition = aspectDefinition;
33     m_aspectQualifiedName = aspectDefinition.getQualifiedName();
34     m_aspectFieldName = aspectFieldName;
35     m_aspectClassName = aspectClassName;
36     m_aspectClassSignature = aspectClassSignature;
37     m_deploymentModel = aspectDefinition.getDeploymentModel();
38     m_aspectFactoryClassName = AspectFactoryManager.getAspectFactoryClassName(m_aspectClassName, m_aspectQualifiedName);
39   }
40
41   public AspectDefinition getAspectDefinition() {
42     return m_aspectDefinition;
43   }
44
45   public String JavaDoc getAspectClassName() {
46     return m_aspectClassName;
47   }
48
49   public String JavaDoc getAspectQualifiedName() {
50     return m_aspectQualifiedName;
51   }
52
53   public DeploymentModel getDeploymentModel() {
54     return m_deploymentModel;
55   }
56
57   public String JavaDoc getAspectFieldName() {
58     return m_aspectFieldName;
59   }
60
61   public String JavaDoc getAspectClassSignature() {
62     return m_aspectClassSignature;
63   }
64
65   public String JavaDoc getAspectFactoryClassName() {
66     return m_aspectFactoryClassName;
67   }
68
69   public AspectModel getAspectModel() {
70     return m_aspectModel;
71   }
72
73   public void setAspectModel(AspectModel aspectModel) {
74     m_aspectModel = aspectModel;
75   }
76
77   public boolean equals(Object JavaDoc o) {
78     //TODO should we use AspectDef instead ??
79
if (this == o) {
80       return true;
81     }
82     if (!(o instanceof AspectInfo)) {
83       return false;
84     }
85
86     final AspectInfo aspectInfo = (AspectInfo) o;
87
88     if (!m_aspectQualifiedName.equals(aspectInfo.m_aspectQualifiedName)) {
89       return false;
90     }
91
92     return true;
93   }
94
95   public int hashCode() {
96     return m_aspectQualifiedName.hashCode();
97   }
98 }
99
Popular Tags