1 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 17 public class AspectInfo { 18 private final AspectDefinition m_aspectDefinition; private final String m_aspectQualifiedName; 20 private final String m_aspectFieldName; 21 private final String m_aspectClassName; 22 private final String m_aspectClassSignature; 23 private final String m_aspectFactoryClassName; 24 private final DeploymentModel m_deploymentModel; 25 26 private AspectModel m_aspectModel; 27 28 public AspectInfo(final AspectDefinition aspectDefinition, 29 final String aspectFieldName, 30 final String aspectClassName, 31 final String 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 getAspectClassName() { 46 return m_aspectClassName; 47 } 48 49 public String getAspectQualifiedName() { 50 return m_aspectQualifiedName; 51 } 52 53 public DeploymentModel getDeploymentModel() { 54 return m_deploymentModel; 55 } 56 57 public String getAspectFieldName() { 58 return m_aspectFieldName; 59 } 60 61 public String getAspectClassSignature() { 62 return m_aspectClassSignature; 63 } 64 65 public String 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 o) { 78 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 |