From 447cdc9d31a9e85f754eba3d0b4e461e60dc999d Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 13 Aug 2009 17:29:16 +0000 Subject: [PATCH] 286539: test and fix (decanno type in model) --- asm/src/org/aspectj/asm/IProgramElement.java | 10 ++++++++++ .../aspectj/asm/internal/ProgramElement.java | 17 +++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/asm/src/org/aspectj/asm/IProgramElement.java b/asm/src/org/aspectj/asm/IProgramElement.java index b51fd1731..a3a236b6b 100644 --- a/asm/src/org/aspectj/asm/IProgramElement.java +++ b/asm/src/org/aspectj/asm/IProgramElement.java @@ -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 diff --git a/asm/src/org/aspectj/asm/internal/ProgramElement.java b/asm/src/org/aspectj/asm/internal/ProgramElement.java index 57f2fc31f..e9e6a9fb2 100644 --- a/asm/src/org/aspectj/asm/internal/ProgramElement.java +++ b/asm/src/org/aspectj/asm/internal/ProgramElement.java @@ -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); } -- 2.39.5