KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > aspectwerkz > transform > inlining > AspectInfo


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;
9
10 import org.codehaus.aspectwerkz.definition.AspectDefinition;
11 import org.codehaus.aspectwerkz.DeploymentModel;
12 import org.codehaus.aspectwerkz.DeploymentModel;
13
14 /**
15  * TODO docuemnt
16  *
17  * @author <a HREF="mailto:alex@gnilux.com">Alexandre Vasseur</a>
18  */

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