]> source.dussan.org Git - aspectj.git/commitdiff
286539: test and fix (decanno type in model)
authoraclement <aclement>
Thu, 13 Aug 2009 17:29:16 +0000 (17:29 +0000)
committeraclement <aclement>
Thu, 13 Aug 2009 17:29:16 +0000 (17:29 +0000)
asm/src/org/aspectj/asm/IProgramElement.java
asm/src/org/aspectj/asm/internal/ProgramElement.java

index b51fd173161af0f810f2221d7e32fc50b62c5860..a3a236b6b95a916121fa499ebc763d4178c5a433 100644 (file)
@@ -403,4 +403,14 @@ public interface IProgramElement extends Serializable {
        public void setAnnotationStyleDeclaration(boolean b);
 
        public boolean isAnnotationStyleDeclaration();
+
+       /**
+        * @param fullyQualifiedannotationType the annotation type, eg. p.q.r.Foo
+        */
+       public void setAnnotationType(String fullyQualifiedannotationType);
+
+       /**
+        * @return the fully qualified annotation type, eg. p.q.r.Foo
+        */
+       public String getAnnotationType();
 }
\ No newline at end of file
index 57f2fc31f31fe636c1f2daf9262ca5f2d7e787e9..e9e6a9fb28b246f1bd58bea0b984f60f00d77fb5 100644 (file)
@@ -356,6 +356,23 @@ public class ProgramElement implements IProgramElement {
                return (List) (kvpairs == null ? null : kvpairs.get("parentTypes"));
        }
 
+       /**
+        * {@inheritDoc}
+        */
+       public void setAnnotationType(String fullyQualifiedAnnotationType) {
+               if (kvpairs == Collections.EMPTY_MAP) {
+                       kvpairs = new HashMap();
+               }
+               kvpairs.put("annotationType", fullyQualifiedAnnotationType);
+       }
+
+       /**
+        * {@inheritDoc}
+        */
+       public String getAnnotationType() {
+               return (String) (kvpairs == null ? null : kvpairs.get("annotationType"));
+       }
+
        public String getCorrespondingType() {
                return getCorrespondingType(false);
        }