]> source.dussan.org Git - aspectj.git/commitdiff
source locations for declare annos (not persisted) and fqname of handles for itds
authoraclement <aclement>
Wed, 18 Aug 2010 17:00:58 +0000 (17:00 +0000)
committeraclement <aclement>
Wed, 18 Aug 2010 17:00:58 +0000 (17:00 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/patterns/DeclareAnnotation.java

index faeea711b7b23df0584fa6cdaaa3503665d2e752..ddd526f96e2f0da7c4f0571e204deff048507f72 100644 (file)
@@ -19,6 +19,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.aspectj.bridge.MessageUtil;
+import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
 import org.aspectj.weaver.AnnotationAJ;
 import org.aspectj.weaver.CompressingDataOutputStream;
 import org.aspectj.weaver.ISourceContext;
@@ -28,7 +29,6 @@ import org.aspectj.weaver.UnresolvedType;
 import org.aspectj.weaver.VersionedDataInputStream;
 import org.aspectj.weaver.WeaverMessages;
 import org.aspectj.weaver.World;
-import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
 
 /**
  * Represents a declare annotation statement, one of atField, atMethod, atConstructor or atType.
@@ -53,6 +53,10 @@ public class DeclareAnnotation extends Declare {
        private AnnotationAJ annotation; // discovered when required
        private ResolvedType annotationType; // discovered when required
 
+       // not serialized:
+       private int annotationStart;
+       private int annotationEnd;
+
        /**
         * Constructor for declare atType.
         */
@@ -160,6 +164,19 @@ public class DeclareAnnotation extends Declare {
                this.annotationStrings.set(0, annotationString);
        }
 
+       public void setAnnotationLocation(int start, int end) {
+               this.annotationStart = start;
+               this.annotationEnd = end;
+       }
+
+       public int getAnnotationSourceStart() {
+               return annotationStart;
+       }
+
+       public int getAnnotationSourceEnd() {
+               return annotationEnd;
+       }
+
        public void setAnnotationMethod(String methodName) {
                this.annotationMethods.set(0, methodName);
        }